This beats-per-minute calculator is a quick and easy project using the Adafruit Trinket microcontroller board and 7-segment LED Backpack.

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)

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. Once you have it up and running, you’ll then install the following libraries:

Installing Arduino libraries is a frequent stumbling block. If this is your first time, or simply needing a refresher, please read the All About Arduino Libraries tutorial.

Schematic

If using a solderless breadboard, first install row pin headers on both your Trinket board and the LED Backpack. The backpack requires soldering the LED display to the board…follow the Adafruit LED Backpacks guide and make sure it’s lined up the right way!

To assemble the project, only six connections are needed:
The diagram shows a 5V Trinket board, but the project is interchangeable with the 3.3V version; everything is wired the same.
  • 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.
Unlike some regular Arduino projects, the choice of pins here is not negotiable. The selection will be explained later.

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.

This guide was first published on Sep 07, 2013. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.