What the heck is nodemcu and all.. It is a dev board with microcontroller core with on board esp8266. Have a look here for more info.
Flashing firmware to the new NodeMCU just picked up (version 0.9 and 0.9E) from a mac OS:
- Download the specific usb-to-serial driver from here(for ver 0.9E) and here(for ver 0.9). Install it..
- Download the latest build of the nodemcu firmware from here (A good way to find them later when they upload latest ones, is to go to the nodemcu-firmware git repo and find the .bin version from releases from top of the repo).
- Clone the esp-tool repo or Download the esp-tool zip file. (it contains a python file to flash the firmware. The default softwares seems to crash and hang up machines)
- For cloning: git
- From terminal go to the directory and type
python setup.py install(this is similar to install any python module manually and thus would install the esp-tool).
- Put in the usb cable in the nodemcu and put it on your computer while holding the flash button(You need to do it only while hooking it for the first time).
- Now it’s time to find the virtual com port and in this case it appears not as
slab. So run this command on the terminal
"slab"(for ver 0.9E)
ls /dev/cu.*(for ver 0.9)
- It will give some list like this:
- we are interested in the
tty.SLAB_USBtoUART(for ver 0.9E)
cu.whcusbserial11450(for ver 0.9)
- Copy the downloaded firmware file(nodemcu_float_0.9.6-dev_20150704.bin) into the esp-tool folder(This will save us from writing extra terminal command later to mention the path of the firmware file).
- Now from terminal go to the esp-tool directory(if you are not into it in the terminal). and type this
- If everything goes ok, You’ll see.
- Congratulation! you’ve successfully upgraded the firmware of the nodemcu..
- This is just the start of a lengthy process so don’t fly yet.
- After the process finishes, remove the nodemcu from the usb port.
Now install ESPlorer(The IDE from where we’d write lua scripts to the nodemcu), click here
Make sure you have proper java runtime installed(generally it is installed).
Now from the extracted folder just “double click” the ESPlorer.jar and you’d see the IDE looks like above.
Refresh the ports and as soon as you see your port, select it, keep the baud rate at 9600 and click “Open”. You’d see this at the end if everything’s okay.
-For ver 0.9
-For ver 0.9E
Now put this script under “scripts” tab: (It’s a blinking led sketch)
Then click on “Save on ESP” to upload it on the node mcu and that’s it. Now you can go ahead and stick an LED on Pin4 and see it blink.
Resources and helps: Paul Adams, http://www.roboremo.com/flashing-nodemcu-firmware-to-esp8266.html and http://nodemcu.org/