Following 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;
//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 [personal profile] chebe

Lightbox RGBW Upgrade

2019-Sep-06, Friday 06:25 pm
I'm wandering around a supermarket when I spot an A4 lightbox. The kind I see in many bars and youtube videos; backlit with white LEDs, a plastic diffuser, and slots for placing plastic tiles with letters written on them. It's a nice idea, restrained, classy. Requires 6 AA batteries. 6?! That's 9 volts. For 18 white LEDs? I needed to see what was going on inside.



Original lightbox, out of packaging
Photo by [personal profile] chebe



Details )

Then finally connect the RBGW LED strip up to a microcontroller, load up the example sketch, and close up the lightbox. Oooh pretty. I have this working as a rather colourful lamp off an Arduino until I can figure out how to get my Feather 32u4 Bluefruit LE working correctly. But it can run off a 3.7V battery, or USB power. Which is a considerable improvement over 6 AAs and 9V. And with so many more colour options!



Upgraded lightbox of many colours
Photo by [personal profile] chebe



*edit* Finished in part two.