Day 6: Johnny-Five, NodeMCU
Today was the first day of my hands-on experience for these modules, chips and wirings. It was an exciting day!
After playing with several starter examples (pulsing LEDs, RGB LED module, 7 segment LEDs, etc.) using Arduino language, which helped me get familiar with the development environment and its IDE, I switched to use Johnny Five.
Johnny-Five is an Open Source, Firmata Protocol based, IoT and Robotics programming framework, developed at Bocoup. Johnny-Five programs can be written for Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, pcDuino3, Raspberry Pi, Spark/Particle Core, TI Launchpad and more!
I went on and wanted to get a 4-digit 7-segment LED module to show the temperature on the display . I think I got all the wirings correct, but there was one segment always showing the wrong state. I may need to revisit this part later.
I bought this NodeMcu Lua WIFI Development Board For ESP8266 Module from Banggood, and it does not provide much documentation as Banggood states on that product detail page. It makes a beginner like me a little hard to sort it out. After googling it and youtubing it, I finally got this little magic chip to work. One thing I have learned is that, this chip can be only for prototyping but for production, given that the documentation is so limited.
There is no website that records the steps that I took to make this chip to work. I took several references, and got this to work. So I’m writing them down, in case other people may need it. I’m using Mac OSX Yosemite.
- Download the driver from here, and install it on your Mac
- Run this command line only for Yosemite
sudo nvram boot-args=”kext-dev-mode=1"
- Reboot the computer
- Go to terminal, and type:
You should be able to find out the new serial port. Mine says: /dev/tty.wchusbserial620
Flash the latest firmware
- Download the latest firmware from
- Download the flash tool esptool.py by clone the git:
git clone https://github.com/themadinventor/esptool.git
- Hold the flash button on the NodeMCU board, and run
./esptool.py — port=/dev/ttyUSB0 write_flash 0x00000 nodemcu_latest.bin
4. Download and install ESPlorer, and start to code! Then you can actually follow the YouTube video for the fun part.
At the end of day, I got the WiFi scanning working on the NodeMCU using the language Lua. You can find the source code here.