Skip to content

xil-se/workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NodeMCU - IoT on the cheap

How to get started with the NodeMCU and the ESP8266 chip it contains.

Tools

Linux

Prerequisites: java, python2.7, pyserial

  1. 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

  2. Download NodeMCU binary, from here.

  3. Flash NodeMCU binary to the NodeMCU esptool.

    python esptool.py -p /dev/ttyUSB0 write_flash 0x000000 Downloads/nodemcu_1.4.bin

  4. Push the button marked 'RST' on the NodeMCU board.

  5. Start ESPlorer.

  6. Download one of the Lua sample scripts from below.

  7. Rename sample script to init.lua.

  8. Open the file you renamed to init.lua in ESPlorer.

  9. Click the 'Open' button in ESPlorer, to connect ESPlorer to the NodeMCU board.

  10. Push the button marked 'RST' on the NodeMCU board.

  11. Watch whatever you pu into init.lua execute upon boot.

Mac

Prerequisites: java, python2.7, pyserial

  1. Download and install the CP2012 driver used for the NodeMCU USB-Serial chip, CP2102 driver.

  2. 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

  3. Download NodeMCU binary, from here.

  4. Flash NodeMCU binary to the NodeMCU esptool.

    python esptool.py -p /dev/cu.SLAB_USBtoUART write_flash 0x000000 Downloads/nodemcu_1.4.bin

  5. Push the button marked 'RST' on the NodeMCU board.

  6. Start ESPlorer.

  7. Download one of the Lua sample scripts from below.

  8. Rename sample script to init.lua.

  9. Open the file you renamed to init.lua in ESPlorer.

  10. Click the 'Open' button in ESPlorer, to connect ESPlorer to the NodeMCU board.

  11. Push the button marked 'RST' on the NodeMCU board.

  12. Watch whatever you pu into init.lua execute upon boot.

Windows

Prerequisites: java

  1. Download and install the CP2012 driver used for the NodeMCU USB-Serial chip, CP2102 driver.
  2. Download NodeMCU binary, from here.
  3. Flash NodeMCU binary to the NodeMCU using ESP8266 Flasher Usage.
  4. Push the button marked 'RST' on the NodeMCU board.
  5. Start ESPlorer.
  6. Download one of the Lua sample scripts from below.
  7. Rename sample script to init.lua.
  8. Open the file you renamed to init.lua in ESPlorer.
  9. Click the 'Open' button in ESPlorer, to connect ESPlorer to the NodeMCU board.
  10. Push the button marked 'RST' on the NodeMCU board.
  11. Watch whatever you pu into init.lua execute upon boot.

NodeMCU Firmware Binary

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.

nodemcu_1.4.bin

Sample LUA Scripts

Rename either one of these files to init.lua and upload it to the NodeMCU board.

Other Resources

  • 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.

About

How to get started with the NodeMCU/ESP8266

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages