Update: ESP8266 WiFi server complete (enough)…

Photo 01-05-2015 16 19 46So a new Arduino arrived today after the connectors gave out on my older ones. It’s a cheap UNO clone and will be followed by a selection of Nano’s for various coming projects. I added support to my ESP8266 project¬†for lightsOn, lightsOff, and setting a value for the lights on. Which can be found in the github repo. The server responds with a simple JSON string explaining the current state of the light, and can be adjusted by sending particular HTTP requests.

It’s pretty simple to understand what’s going on in the code and it’s probably best to have a dig through it to figure out what’s what. The part which got me a bit confused was the connection tracking but I took a look at another project to get to grips with dealing with that properly.

Turns out the ESP8266 is a pretty decent Wifi module for Arduino, it’s significantly cheaper than the wifi shield on price, and as far as functionality, stability and ease of use it beats the hell out of the official original Wifi Shield. You’ve got basically the exact same functionality, but you’ve got a lot more memory left over and the offloading of the majority of the wifi handling to the chip, and this also allows it to be very performant and responsive in comparison to the wifi shield.

[auction-affiliate tool=”lister”]

I’m planning a couple of cool features for these wifi lights. First, when lightning strikes within a 10 mile radius, the light is sent a “lightning” signal which will make it flicker like an incandescent in a lightning storm might. Second, I’ll add a candle light feature which will keep the brightness low and flicker gently.