How to get started with the NodeMCU and the ESP8266 chip it contains.
- ESPlorer
- [Win] ESP8266 Flasher
- [Linux/OSX] esptool
- [OSX] USB-Serial driver CP2102 driver
- [Windows] USB-Serial driver CP2102 driver
Prerequisites: java, python2.7, pyserial
-
Make sure you have OS permissions to access the NodeMCU serial interface. If the below command fails, the serial interface has another name or you don't have permissions to it.
cat /dev/ttyUSB0
-
Download NodeMCU binary, from here.
-
Flash NodeMCU binary to the NodeMCU esptool.
python esptool.py -p /dev/ttyUSB0 write_flash 0x000000 Downloads/nodemcu_1.4.bin
-
Push the button marked 'RST' on the NodeMCU board.
-
Start ESPlorer.
-
Download one of the Lua sample scripts from below.
-
Rename sample script to init.lua.
-
Open the file you renamed to init.lua in ESPlorer.
-
Click the 'Open' button in ESPlorer, to connect ESPlorer to the NodeMCU board.
-
Push the button marked 'RST' on the NodeMCU board.
-
Watch whatever you pu into init.lua execute upon boot.
Prerequisites: java, python2.7, pyserial
-
Download and install the CP2012 driver used for the NodeMCU USB-Serial chip, CP2102 driver.
-
Make sure you have OS permissions to access the NodeMCU serial interface. If the below command fails, the serial interface has another name or you don't have permissions to it.
cat /dev/cu.SLAB_USBtoUART
-
Download NodeMCU binary, from here.
-
Flash NodeMCU binary to the NodeMCU esptool.
python esptool.py -p /dev/cu.SLAB_USBtoUART write_flash 0x000000 Downloads/nodemcu_1.4.bin
-
Push the button marked 'RST' on the NodeMCU board.
-
Start ESPlorer.
-
Download one of the Lua sample scripts from below.
-
Rename sample script to init.lua.
-
Open the file you renamed to init.lua in ESPlorer.
-
Click the 'Open' button in ESPlorer, to connect ESPlorer to the NodeMCU board.
-
Push the button marked 'RST' on the NodeMCU board.
-
Watch whatever you pu into init.lua execute upon boot.
Prerequisites: java
- Download and install the CP2012 driver used for the NodeMCU USB-Serial chip, CP2102 driver.
- Download NodeMCU binary, from here.
- Flash NodeMCU binary to the NodeMCU using ESP8266 Flasher Usage.
- Push the button marked 'RST' on the NodeMCU board.
- Start ESPlorer.
- Download one of the Lua sample scripts from below.
- Rename sample script to init.lua.
- Open the file you renamed to init.lua in ESPlorer.
- Click the 'Open' button in ESPlorer, to connect ESPlorer to the NodeMCU board.
- Push the button marked 'RST' on the NodeMCU board.
- Watch whatever you pu into init.lua execute upon boot.
WARNING: This NodeMCU image is not built with all the modules that NodeMCU supports. Please make a new image that contains the modules you need. Visit for NodeMCU Custom Builds for a service that will do just that for you.
Rename either one of these files to init.lua and upload it to the NodeMCU board.
- NodeMCU Custom Builds - Have a custom NodeMCU version built with all the modules that you need
- NodeMCU API - Have a look at all of the modules and function calls supported by NodeMCU
- Buy NodeMCU boards - The boards are ~$4 including shipping from China.