meta data for this page
NodeMCU Introduction
Documentation
Flashing Firmware via ESPtool
python esptool.py -p /dev/ttyUSB0 write_flash -fm dio 0x00000 nodemcu-master-14-modules-2017-04-15-15-39-12-integer.bin
Arduino-IDE
GPIO
- mapping D1 mini to ESP-8266 to NodeMCU
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
screen /dev/ttyUSB0
or use the arduino ide on debian-testing
- get all information using
udevadm info -a -n /dev/ttyUSB0
this yields the following output
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"
- creating a udev rule in
/etc/udev/rules.d
named
30-wiffy.rules
with the following content
SUBSYSTEM=="tty", SYSFS{idVendor}=="1a86", SYSFS{idProduct}=="7523", ACTION=="add", GROUP="dialout", MODE="0664", SYMLINK+="wiffy"
- now you can access your nodemcu via
screen /dev/ttyUSB0 115200