NeoPixels are a variety of addressable multicolored LEDs, meaning that their color and brightness can be programmed by a microcontroller like an Arduino. This can support some stunning cyberpunk aesthetics, like this wig or this umbrella. Imagine a bicycle with flickering strips of them, sliding along foggy Carrboro roads at night like a bioluminescent deep-sea cephalopod!
We're going to start off learning on a 12-LED NeoPixel ring. Here's a few projects that we're looking at:
- Generic NeoPixel Exercises
- Wiring to Arduino
- Circular Topology
- Chasing Rainbow
- Tunable Chasing Rainbow
- Trigger-Reversible Chasing Rainbow
- Dial-Reversible Chasing Rainbow
- Modulo 12
- Analog Clock
- Groups and Greatest Common Factors
Generic Exercises
Wiring can be a little tricky, with improper wiring sometimes causing weird flickering behavior! this glitchiness can be fun to watch for a little bit, but it's hard to develop with this unpredicable behavior interfering. Proper grounding seems to be key here. There's a wiring guide at Adafruit. A little solder and we're ready to go!
Circular Topology
The NeoPixels are addressable, which means that each one is given a unique integer to identify it. Here's this idea in practice, from an example script:
Modulo 12
This ring has 12 lights in it, which means that we can do some interesting things that we might not with a different number. One has to do with timekeeping, which splits time into 12-hour half-days, 60-minute hours, and 60-second minutes (sixty being twelve times five). The twelve pixels arranged in a circle might form a familiar clockface, with color being used to differentiate between hour, minute, and second markers.
We might also use the 12 lights to illustrate some facts about abstract algebra: The circular arrangement of lights can illustrate how numbers coprime to 12 (ie those which don't share a greatest common denominator: 1,5,7,11) generate the whole 12-member group under modular addition, while numbers which share a divisor with 12 (ie, 2,3,4,6,8,9,10) generate a subgroup with order equal to twelve divided by the common divisor.