Friday 22 September 2017

Quick random hack! Digispark, neo pixels and USB battery




 




A few things collided this week... one being I managed to knacker my back and therefore spent some time trapped in the house! The next thing being the constant stream (as my long suffering postperson will attest) of small cheap random components from the far east creates little pools of tech that lie await for such times (you can tell I've not spoken to many people this week with my waffle?!). So I came across this small Digispark clone which I hadn't played with and I couldn't quite remember what I'd ordered it for! Essentially its a Attiny85 on a board with a PCB USB connector and after some trials and tribulations I managed to get an Arduino IDE to talk to it on a windows 7 machine (my linux box is poorly atm but that's another story!)

Also in the tech flotsam I have a few of those excellent poundland USB batteries and a small plan emerged! So with the addition  of a piece of white heatshrink glued to the battery pack into which I inserted a 8 pixel adafruit neo pixel strip (needs to be inside something cos dang they are bright!) and a microswitch glued to the side of the Digispark/Attiny board we have a switchable portable superbright mood light/torch! I've stuck a couple of strong neomydium magnets to the back of the USB battery so I can stick it to metal things! Its handy to stick to my field toolbox and also I've added a short strip of metal to the back of my larger rolling toolbox I use for workshops.. useful for a bit of light but also a be seen be safe addition on these dark winter nights! Code is just a tweaked version of the button cycler sketch from the adafruit neopixel library.

No comments: