Last week, Adafruit launched the Trinket, a tiny microcontroller (MCU) board built around Atmel’s versatile ATtiny85. This week, Adafruit’s Phillip Burgess is showcasing the Tap Tempo Trinket, a DIY beats-per-minute calculator project powered by Atmel’s ATtiny 85 and the Trinket board.
“This beats-per-minute calculator is a quick and easy project,” Burgess explained in a recent Adafruit post. “You tap the button in time with music [and the] Trinket reports the corresponding beats-per-minute.”
Required components include:
- 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)
“If this is your first time using Trinket, work through the Introducing Trinket guide first; you need to customize some settings in the Arduino IDE first,” Burgess continued. “Once you have it up and running, you’ll then install the following libraries: TinyWireM (a Trinket-compatible alternative to the Arduino Wire library), Adafruit_LEDBackpack and Adafruit_GFX (required by Adafruit_LEDBackpack).”
According to Burgess, the simple DIY project is one where Trinket really shines, with the largest section of the code simply flashing “TAP BEAT” at startup.
“Button input is debounced, time between button taps is then calculated using the micros() timer, and BPM is figured by dividing 600,000,000 (10X the number of microseconds in 1 minute) by this time interval. The 10X figure is just so we can look extra geeky by then adding a decimal point,” he added.
Be sure to check out Adafruit’s detailed tutorial here for additional information on how to build your own Tap Tempo Trinket.
Pingback: These slick shades are also a Larson Scanner | Bits & Pieces from the Embedded Design World
Pingback: Building an analog meter clock with Atmel and Adafruit | Bits & Pieces from the Embedded Design World