CheerLights is an “Internet of Things” project created by Hans Scharler that allows people’s lights all across the world to synchronize to one color set by Twitter. This is a way to connect physical things with social networking experiences.
I wanted to have a CheerLights display for my soon-to-be-here son’s nursery. I didn’t want a bright light, but something in the background. I found a Robot Nightlight on Amazon and purchased it. This is a great night light and you can change the color using the included infrared remote control. To connect this light to CheerLights, all you have to do is build something to transmit the IR code for you. This project uses an Internet-connected Particle Photon that subscribes to the latest CheerLights color on ThingSpeak and transmits the IR code as if the button was pressed on the remote control.
To change the color of the CheerLights Robot, send a tweet that mentions CheerLights and a color name.
— Hans Scharler (@scharler) February 28, 2017
The code for the Particle Photon is really straightforward. The gist of the code is that the Particle Photon will request the latest CheerLights color from ThingSpeak. If the color matches one of the defined colors, the Photon will transmit the IR code to the robot just like the IR remote. The robot will change color when CheerLights changes color.
View the source code on GitHub.