I’ve wanted to play with Adafruit’s NeoPixels for a while now. They’re great little devices, available in a number of form factors for sewing into wearables, mounting on breadboards, or epoxying as strips. Each NeoPixel contains red, green and blue LEDs giving 24-bit colour, and a built-in driver chip which provides a one-wire interface for a microcontroller. Unlike the common analog 12v LED strips, NeoPixels are driven at 5v, giving you more options for powering them in wearables projects.
For my project I decided I wanted to replace my bike lights – I’m always forgetting them, or leaving them on the bike and draining the batteries. I figured I could use NeoPixels to build lights into my messenger bag which I always have with me when I’m cycling.
I decided to go with the 30 pixels per meter weatherproof strip as high resolution wasn’t necessary for the ‘Knight Rider’ effect I wanted to achieve. In retrospect I should have gone for the black backing to make it blend in with the bag’s strap. It also remains to be seen how robust the strips are in the long run, and whether sewable pixels would have been a better choice, but after a month of careful wear everything is still in good shape.
I initially sewed the straps on with thread, but there was too much movement in the strap when worn and the thread cut in. Elastic was a better choice and I swapped the thread out in a couple of key places. The ends of the NeoPixel strip are sealed with hot glue and a capacitor added to smooth out the power-on, also sealed in some heatshrink so the whole thing should stand up to cycling through showers. A 4AA battery pack of rechargeables is concealed in the bag with a superglued guard to stop the power switch being knocked.
The controller is the Adafruit Gemma – a beautiful little Arduino board made for wearables projects. As suggested I used tiny snaps to handle the connections to the board, and secured it tightly with sticky-back velcro. Programming the Gemma is no different from any other Arduino board – you just have fewer pins and less memory. Adafruit distribute a helpful Arduino library for NeoPixels which makes interfacing really easy. Included below is my code to achieve the dual red and white effect. If you want to use it in your own projects I’ve made it available as a Gist.
We are angry, frustrated, and in pain because of the violence and murder of Black people by the police because of racism. We are in the fight AGAINST RACISM. George Floyd was murdered, his life stolen. The Adafruit teams have specific actions we’ve done, are doing, and will do together as a company and culture. We are asking the Adafruit community to get involved and share what you are doing. The Adafruit teams will not settle for a hash tag, a Tweet, or an icon change. We will work on real change, and that requires real action and real work together. That is what we will do each day, each month, each year – we will hold ourselves accountable and publish our collective efforts, partnerships, activism, donations, openly and publicly. Our blog and social media platforms will be utilized in actionable ways. Join us and the anti-racist efforts working to end police brutality, reform the criminal justice system, and dismantle the many other forms of systemic racism at work in this country, read more @ adafruit.com/blacklivesmatter
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.