You: tap the button in time with music.
Trinket: reports the corresponding beats-per-minute.
Parts you’ll need:
- Adafruit Trinket (either the 5V or 3.3V variety)
- 7-segment LED Display Backpack (any color, 0.56" size, not 1.2")
- Momentary "normally open" pushbutton
- Breadboard, jumper wires, USB cable (A to mini B)
- TinyWireM (a Trinket-compatible alternative to the Arduino Wire library)
- Adafruit_GFX (required by Adafruit_LEDBackpack, even though we’re not doing graphics)
To assemble the project, only six connections are needed:
- Connect Trinket’s 5V (or 3V) pin to + on the LED backpack and one leg of the pushbutton.
- Connect the opposite leg of the pushbutton to Trinket pin #1.
- Connect Trinket’s GND pin to – on the backpack.
- Connect Trinket Pin #0 to D (data) on the backpack.
- Connect Trinket Pin #2 to C (clock) on the backpack.
For simplicity’s sake we’re using the USB connection for power. For portable use, an optional battery pack can be connected to the Trinket’s BAT and GND pins.