Tuesday, May 30, 2017

More fun ways to "spend" time

So after making an arcade console and getting the kids hooked on great old video games, I saw this set of videos from Bob at http://www.iliketomakestuff.com
Arcade Cabinet Part 1
Arcade Cabinet Part 2
Arcade Cabinet Part 3

Parts 1 and 2 were informative, but part 3... A human sensor that turns the lights on and off!!! Must have!

So I started playing with an arduino uno board, (really fun) but then I got to playing with this little creature:
  you can learn more here: https://en.wikipedia.org/wiki/NodeMCU

It took a bit of fiddling to get it to work so I wanted to capture that on the blog for later use.

First I had to get drivers here: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers

Once I had the drivers, I plugged it in and got a new terminal device: /dev/tty.SLAB_USBtoUART
So then I had to set up the Arduino IDE:
I opened preferences and added http://arduino.esp8266.com/stable/package_esp8266com_index.json to the Additional Boards manager URLs:
Clearly I did this on my mac, but it is similar in WinDOZE.

At that point I could open the boards manager:

And install the esp8266 boards by clicking the install button next to version 2.3.0:

Finally I could select the NodeMCU in the IDE user interface under tools:
and select the right port:
pushed it to the chip and ran > screen /dev/tty.SLAB_USBtoUART 115200
and lo and behold, a web server with my own custom code that actually turns my led's on and off!

How absolutely amazing!!!
Next up: get my relay working with this board, connect up the sensor, add a few buttons to turn things on and off via this web client...

Good stuff and so fun to learn something new!

No comments: