[personal profile] chebe
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.



Lightbox (with face removed) in clamp
Photo by [personal profile] chebe



This is messy business. I drilled the hole just to the size of the connector so it would be physically snug when put in.



Lightbox (side) with circular hole drilled in case
Photo by [personal profile] chebe



When inserting I super-glued the connector in place, and left to dry.



Connector super-glued into hole drilled in case
Photo by [personal profile] chebe



Then on the inside it was just a matter of connecting the barrel jack to JST cable, and the NeoPixel cables up to the Feather, and hot-gluing everything neatly in place so there would be no shadows cast. The Feather is placed face-down to minimise the visibility of the blinking lights when it is communicating over bluetooth.



Inside lightbox, everything connected and hot-glued in place
Photo by [personal profile] chebe



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