Scratch talking to ESP-12

Went to WutheringBytes at weekend – great talks by Matt Venn on the esp8266 based boards and a great workshop on programming NodeMCU dev boards in Lua by Omer Kilic

Came back home and found I had some sort of ESP-12 dev board lying around that I bought months agao but was still in packet – got it out – had a play with the firmware that came with that allowed it to be talked to as its own AP and then switch it to be client on my home Wifi

Then I found you can flash the NodeMCU firmware to any esp8266 device so I did that and started going thru Omer’s workshop stuff from weekend and got a LED blinking. See Vine

So once I was controlling the RGB LED on my dev board I decided to see if I could run a little server listening on standard Scratch 1.4 Remote Sensor Protocol (Mesh in BYOB) port 42001

So hacked together a script to listen and do some simple parsing of messages and got BYOB to control the RGB led on the dev board.  See Vine

I used BYOB because it can directly connect to port 42001 on a remote computer whereas Scratch 1.4 will only connect to port 42001 on 127.0.0.1 (the computer its running on)

Later on – I remembered that I’d done a python handler ages ago to allow Scratch to connect to remote computer on LAN so I ran that and now I can use Scratch as well as BYOB

I also found that the NodeMCU firmware has WS2812 support so I plugged in a Sparkle from a Crumble and voila – it works.   See Vine

My code for this is up on GitHub

 

Simon

You may also like...

Leave a Reply

Your e-mail address will not be published. Required fields are marked *