This is a variant of the Adafruit Chameleon Scarf that I recently made. I made the color fade and randomly twinkle rather than stay on all the time. I also added a button to restart the color sample sequence as well. To include some motion feedback, I used a Fast Vibration Sensor Switch to increase the number of pixels that go bright when it is triggered.
This is using 20 NeoPixles and the wires between them are rather long so that they can be spread out over a larger aria. The color sensor and button are also at the end of a long wire so that they could be placed inside of a fabric sheathe for easy color sampling. This is the same with the last NeoPixle in the chain so you can see the other puffball blink before the color is sampled.
Code:
https://github.com/RichardA1/Wearables/blob/master/twinkle_color_change/twinkle_color_change.ino
Parts list:
Amount | Part Type | Part Number |
---|---|---|
1 | LiPoly Battery (1200mAh) | 258 |
1 | FLORA Color Sensor | 1356 |
1 | Adafruit Flora | 659 |
20 | Flora RGB Smart NeoPixel version 2 – Sheet of 20 | 1559 |
1 | Fast Vibration Sensor Switch (Easy to trigger) | 1766 |
1 | Colorful Round Tactile Button Switch Assortment – 15 pack | 1009 |