This year, I convinced my wife to let me decorate the small 4’ Christmas tree in our family room. Naturally, I had to use one of the Photons and a LED string I had laying around unused.
Note: This is my first real post here, so I’m not sure how much detail to include. A lot of this information seems like it’d be obvious to the pros around here, but might be useful for people just getting started. Feedback is most welcome. I can try to make it a full tutorial, if there’s any interest.
- Remote control over Wi-Fi via web app, so it’s cross-platform (Windows, Mac, Linux, iOS, Android, etc).
- Responsive web app design, so it’s functional on desktop, laptop, tablet, phone, etc.
- Settings (brightness, selected pattern, etc) are saved to EEPROM, in case it loses power.
- 15 different patterns.
- Solid color mode, with color picker.
- Basic, in-development, experimental, interactive drawing mode. Did I mention it’s experimental?
- A string of 50 WS2811 RGB LEDs
- Particle Photon
- 5V 3A (or higher) power supply
- Jumper wires, perma-proto board, etc.
- Christmas tree
A note on power
I powered both the Photon and LED string with the small 2A USB power adapter. The string could use 3A at full brightness, all white, so I just try to avoid doing that. I really should upgrade to a 5V 4A power supply, just to be safe.
I used the FastLED library, which I highly recommend. It makes it relatively easy to add cool new patterns and effects. It supports a large variety of MCUs (Arduino, Teensy, etc), platforms, and RGB LED chipsets (WS2812, APA102, etc). It’s highly optimized for speed and performance. There’s a fork which adds support for the Core and Photon. It’s available in the Build online IDE and can be downloaded and included in projects in Dev.
The FastLED library is maintained by the brilliant Daniel Garcia and Mark Kriegsman, who regularly add new functionality and share amazing new patterns, effects, techniques, etc. Check out the fantastic FastLED community over on G+: https://plus.google.com/u/0/communities/109127054924227823508
The pattern featured in the video is ColorWavesWithPalettes, which was created and shared by Mark Kriegsman. It draws color waves with an ever-changing, widely-varying set of parameters, using a large set of different color palettes.
Remote Control via Web App
The remote control web app is available here:
You start by entering your Particle access token. You can click the Save button to save it to client-side local storage, so you don’t have to enter it again. Nothing is stored or sent anywhere else. It pulls a list of your Particle devices using your access token. After you select a device, it requests the current setting values (brightness, pattern, color, etc).
Here’s a link to the source code (firmware and web app): https://github.com/evilgeniuslabs/tree
Let me know if you have any questions, comments, suggestions.
New Year’s Resolutions
It’s good to have goals. Next year I’m going to go bigger, and make use of polar coordinate mapping, like the brilliant folks over at Maniacal Labs: