NodeMCU Introduction


Flashing Firmware via ESPtool

  • python -p /dev/ttyUSB0 write_flash -fm dio 0x00000 nodemcu-master-14-modules-2017-04-15-15-39-12-integer.bin



D1 mini label ESP-8266 Pin NodeMCU - index
D8 GPIO 15 8
D7 GPIO 13 7
D6 GPIO 12 6
D5 GPIO 14 5
D0 GPIO 16 0
A0 A0 Analog input
D4 GPIO 2 4
D3 GPIO 0 3
D2 GPIO 4 2
D1 GPIO 5 1

Known Problems

Udev rule Debian-testing

  • without this rule a non-root user, regardless is he is a member of dialout or not, can't execute <code>screen /dev/ttyUSB0</code> or use the arduino ide on debian-testing
  • get all information using <code>udevadm info -a -n /dev/ttyUSB0</code> this yields the following output <code> looking at device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0/tty/ttyUSB0': KERNEL==“ttyUSB0” SUBSYSTEM==“tty” DRIVER==“”

    looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0': KERNELS==“ttyUSB0” SUBSYSTEMS==“usb-serial” DRIVERS==“ch341-uart” ATTRS{port_number}==“0”

    ATTRS{idProduct}==“7523” ATTRS{idVendor}==“1a86” ATTRS{ltm_capable}==“no” ATTRS{maxchild}==“0” ATTRS{product}==“USB2.0-Serial” ATTRS{quirks}==“0x0” ATTRS{removable}==“removable” ATTRS{speed}==“12” ATTRS{urbnum}==“173” ATTRS{version}==“ 1.10” </code>

  • creating a udev rule in <code>/etc/udev/rules.d</code> named <code>30-wiffy.rules</code> with the following content <code> SUBSYSTEM==“tty”, SYSFS{idVendor}==“1a86”, SYSFS{idProduct}==“7523”, ACTION==“add”, GROUP=“dialout”, MODE=“0664”, SYMLINK+=“wiffy” </code>
  • now you can access your nodemcu via <code>screen /dev/ttyUSB0 115200</code>