Lightbox RGBW Upgrade, part two
2019-Oct-20, Sunday 04:45 pmFollowing on from the RGBW upgrade the lightbox just needed some finishing touches. I finally got my Feather 32u4 Bluefruit LE (Adafruit / Pimoroni) working. Hint; you need the example code at the very bottom of this tutorial page, it has all the bits and pieces actually hooked up. The other code just prints hex code to serial, doesn't actually set any NeoPixels.
I first tweaked this code to work with RGBW strips instead of RGB;
Then I set about changing the behaviour. This is first and foremost a lamp, so I set the default behaviour upon power-on to be white with medium brightness. Then I played around with what the buttons in the app would do. I can increase/decrease brightness, reset to default, pick a colour, and play a couple of animations, all in software. Which seems to meet my needs nicely.
Finally I soldered some headers onto the Feather pins for modularity.
The next issue was making the power convenient. Which in this case means mostly mains powered, but not permanently removing the battery option. Also sturdy, and not the slightest bit fiddly. I went with a barrel jack to JST cable (SparkFun / ProtoPic) for inside the lightbox, and barrel jack to USB cable (SparkFun / ProtoPic) for outside the lightbox. I also added a USB cable with switch (Adafruit / Pimoroni) to the mix for even more usability.
The barrel jack to JST cable needed a hole drilled in the case. Flush so it wouldn't leak light, or get in the way when using batteries instead. I used a rotary tool to drill out a nice little circle.
( Details )
Then it's just a case of closing everything up again, plugging the whole thing in to mains, and enjoying.
I first tweaked this code to work with RGBW strips instead of RGB;
//Adafruit_NeoPixel pixel = Adafruit_NeoPixel(NUMPIXELS, PIN);
Adafruit_NeoPixel pixel = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRBW + NEO_KHZ800);
//pixel.Color(255, 255, 255)
pixel.Color(0, 0, 0, 255)Then I set about changing the behaviour. This is first and foremost a lamp, so I set the default behaviour upon power-on to be white with medium brightness. Then I played around with what the buttons in the app would do. I can increase/decrease brightness, reset to default, pick a colour, and play a couple of animations, all in software. Which seems to meet my needs nicely.
Finally I soldered some headers onto the Feather pins for modularity.
The next issue was making the power convenient. Which in this case means mostly mains powered, but not permanently removing the battery option. Also sturdy, and not the slightest bit fiddly. I went with a barrel jack to JST cable (SparkFun / ProtoPic) for inside the lightbox, and barrel jack to USB cable (SparkFun / ProtoPic) for outside the lightbox. I also added a USB cable with switch (Adafruit / Pimoroni) to the mix for even more usability.
The barrel jack to JST cable needed a hole drilled in the case. Flush so it wouldn't leak light, or get in the way when using batteries instead. I used a rotary tool to drill out a nice little circle.
( Details )
Then it's just a case of closing everything up again, plugging the whole thing in to mains, and enjoying.
Lightbox with new mains-via-USB power cable
Photo by
chebe