Arduino-based LED animation to sew in a pointy "magician hat."
Sew the sequin in front of the hat, hide the strand, Gemma and battery inside the hat.
- A magician hat
- Gemma M0
- Vibration sensor switch
- LED Sequin
- NeoPixel LED strand
- Coin cell battery holder
- 5V Step-up/step-down voltage regulator (optional)
- PN2222 transistor (optional)
- JST SM 3 poles cable
- Alligator clips and M3 nuts and bolts (prototype)
- Solder (final wiring)
- D0: strand data
- D1: vibration sensor
- D2: PN2222 base
- Vout: regulator VIN
- GND : strand-, sequin-, regulator GND and vibration sensor
You would think that it will be easier to solder to the strand data to D1 but it is not PWM capable.
Regulates 5V to the strand (optimal for NeoPixels brightness).
- VIN: Gemma Vout
- GND: Gemma GND
- VOUT: strand+
For the sequin to light up more brightly, use a PN2222 transistor. Wire the base to the D2 (instead of sequin+), the emitter to Gemma GND and the collecter to sequin-. Wire sequin+ to Gemma Vout.
The sine wave is generate by sine.py
. It pulses at low power twice, followed
by one high power.
Reduce/increase sampling to speed the animation up/down.