This repository contains ESP8266 Arduino Sketches used by my CheerLights projects. CheerLights is an Internet of Things (IoT) project where lights around the world are synchronised to one colour. That colour is set by anyone on Twitter who mentions CheerLights and a colour. Learn more about CheerLights here.
Name | Protocol | Sketch Link | Notes | Hardware |
---|---|---|---|---|
ESP8266_SingleRGBLED | HTTP | Sketch | ESP8266 + Common Anode RGB LED | |
ESP8266_SingleRGBLED | MQTT | Sketch | ESP8266 + Common Anode RGB LED | |
ESP8266_FastLED | MQTT | Sketch | ESP8266 + LEDs (FastLED compatible) |
This demo uses the ESP8266_SingleRGBLED sketch with the MQTT protocol. Here we can see a tweet for “Red Green Purple #cheerlights” and how it changes two separate trees each with their own microcontroller, notice how they’re in perfect sync and no colours were missed – this is a key advantage over HTTP polling!
ESP8266_SingleRGBLED-MQTT.mp4
This demo uses the ESP8266_FastLED sketch. This version is for controlling Addressable RGB LEDs Strip/Pixels that are compatible with the FastLED library. I’ve created some transition effects for colour changes as an extra bonus, demos of these can be seen below!
Transition Effect: Colour Wipe Demo - Fades LEDs to Black then populates the new colour one LED at a time from either bottom up or top down. This demo shows Cyan > Magenta > White.
colourWipe.mp4
Transition Effect: Shuffle In Demo - Shuffles in a new colour one LED at a time. This demo shows Blue > Red > Green.
ShuffleIn-Demo.mp4
Transition Effect: Fade Toward Colour - Fades the RGB colour of all LEDs toward the new RGB colour. This demo shows Blue > Red > Green.
FadeTowardColour-Demo.mp4
More details can be found here: http://jfrmilner.co.uk/christmasiotree