You can build a beginner-friendly Arduino metronome with a row of LEDs that sweeps back and forth as a visual tempo cue. The Arduino Project Hub design also describes an OLED BPM readout and piezo buzzers, but its published sketch does not show buzzer-control code, and its listed OLED size differs from the size configured in the sketch. Treat those features as items to verify rather than assuming the posted code is a complete, audible build.
What this Arduino metronome is designed to do
The project uses a potentiometer to change tempo and sweeps eight LEDs forward and backward to create a pendulum-like visual effect. Its published description also calls for an OLED display that reports BPM and two active piezo buzzers. The project page says that a higher slide-potentiometer position slows the motion, while a lower position speeds it up. The page was published November 10, 2023; its parts list and code should be checked against the components you actually have before assembly. Arduino Project Hub: DIY Simple Arduino Metronome
Parts and details to resolve before building
| Item | What the project page specifies | What to check |
|---|---|---|
| Arduino board | One Arduino Nano | Use a Nano-compatible board only after confirming its pin and library compatibility. |
| Tempo control | The parts list names a 10 kΩ potentiometer; the prose describes a slide potentiometer in a 10–100 kΩ range. | The page gives two different specifications. Confirm the potentiometer value and wiring rather than treating the descriptions as identical. |
| LEDs and resistor | Eight 3 mm LEDs and one 470 Ω resistor are listed; the prose also mentions one common 470 Ω resistor. | Follow an appropriate circuit diagram and verify current limiting for your LED arrangement. The page’s description alone does not establish that one resistor is suitable for every wiring configuration. |
| Buzzers | Two piezo buzzers are listed, and the prose calls them active buzzers connected to D2 and D9. | The posted sketch does not visibly control either buzzer; adding the parts alone will not make the published code audible. |
| OLED display | The parts list specifies a 0.91-inch, 128×32 SSD1306 I2C OLED. | The sketch configures a 128×64 display at I2C address 0x3C. Check that the display dimensions and library configuration match your module. |
| Tools | A soldering kit is listed. | The page does not establish whether soldering is required for every module or setup. |
The project page says you can omit the display and draw a BPM scale beside the slide potentiometer instead. That avoids the screen-size mismatch, though you will not get a numeric readout from the display code. For first assembly, a breadboard and jumper wires can help you check connections before soldering; a related metronome example also lists them. Arduino Project Hub
How the posted sketch produces the visual motion
The published sketch reads the potentiometer on analog input A0. It maps the reading to a delay from 20 to 125 milliseconds and maps that delay to a displayed value from 160 down to 60 BPM. It then turns LEDs on and off across digital pins 2 through 9, first in one direction and then back. The display code writes a BPM label and value.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- 35+ Guided Electronics Projects: Progress from LEDs and buttons to RFID access, real-time clocks, motion and distance sensing, environmental monitoring, motor control and interactive displays for STEM learning, coding clubs and maker projects
- More I/O and Memory for Larger Builds: The MEGA 2560 R3 provides 54 digital I/O pins, including 15 PWM outputs, 16 analog inputs, 4 hardware serial ports and 256 KB flash for projects that combine more sensors, controls and displays
- 200+ Components for Prototyping: Includes LCD1602, RC522 RFID, RTC, DHT11, HC-SR501 PIR, ultrasonic and water-level sensors, GY-521, MAX7219, keypad, joystick, rotary encoder, relay, SG90 servo, stepper motor, DC motor, breadboard and more
- Learn, Modify and Create: Follow 35+ guided lessons with example code, then adjust sensor thresholds, timing, display text, motor behavior and control logic to turn structured exercises into access systems, monitors, alarms and interactive projects
- Organized for Repeatable Learning: Pre-soldered modules, a solderless breadboard, storage case and small-parts box reduce setup time and keep sensors, LEDs, ICs, wires and other components easy to find between projects
This timing is not a direct beat interval calculation. The delay controls each step in the light sweep; it is not the same as setting one interval per musical beat. Consequently, the displayed BPM mapping should not be mistaken for a verified measurement of the LED cycle or proof that the device keeps time accurately.
Why the sound feature needs separate code
Although the project description and parts list mention two active buzzers, the displayed loop contains LED digital writes but no visible tone() call or other buzzer-control instruction. As published, the sketch does not demonstrate audible beats. The Arduino tone() reference explains how to generate a tone on a chosen pin and notes that the pin can connect to a piezo buzzer or another speaker. You would need to add and validate suitable sound code for your particular board and buzzer before relying on the project for audible timing.
Rank #2
- LEARN ELECTRONICS AND CODING FROM SCRATCH: Start your maker journey or enhance classroom learning with the Arduino Starter Kit R4 – no prior experience required. Includes a printed project book and all components for 13 hands-on tutorials, as well as access to a growing repository of projects that will be added over time.
- POWERED BY THE ARDUINO UNO R4 WIFI BOARD: Discover modern connectivity and performance with the Arduino UNO R4 WiFi, featuring built-in Wi-Fi and Bluetooth and full compatibility with the Arduino ecosystem.
- CERTIFICATION VOUCHER INCLUDED: Once you’ve mastered sensors, motors, displays, and logic through the projects, take the official Arduino Fundamentals certification exam with the voucher that comes with your kit.
- BONUS DIGITAL RESOURCES: Register your kit online to unlock extra projects, multilingual lessons (Italian, German, French), and exclusive online content designed by the Arduino team.
- DESIGNED FOR LEARNING AND TEACHING: Ideal for classrooms, labs, or self-learners. Combine hands-on experiments with clear explanations and an AI coding assistant to support you as you grow.
A conventional beat-timing approach
For a metronome where each beat should occur at a chosen BPM, calculate the interval in milliseconds as 60000 / BPM. For example, an implementation can use a potentiometer to set BPM, wait one calculated beat interval, and make a sound or flash an LED on each beat. To distinguish measures, it can use a different tone or LED for the first beat.
Other Arduino Project Hub examples illustrate those choices rather than proving that the simple sweep sketch already implements them. The April 22, 2025 “Arduino Tick-Tock Metronome” example maps a potentiometer on A0 to 42–208 BPM, calculates beat intervals using 60000 / bpm, flashes an LED, and uses one tone for every fourth beat and another for the other beats; it also uses a 16×2 LCD. Arduino Project Hub: Arduino Tick-Tock Metronome
Rank #3
- 30+ Guided Electronics Projects: Start with LEDs and build toward LCD1602 displays, RFID access, motion detection, distance sensing, motor control and environmental monitoring for STEM learning, coding clubs, classrooms and hobby projects
- 200+ Components Across 63 Types: Includes an ELEGOO UNO R3 controller, LCD1602, RC522 RFID, RTC, HC-SR501 PIR sensor, ultrasonic sensor, DHT11, GY-521, MAX7219, keypad, joystick, relay, SG90 servo, stepper motor, breadboard and more
- Begin Without Soldering: Pre-soldered modules, a solderless breadboard, organized storage case and small-parts box reduce setup time and help beginners move from lesson to lesson while keeping LEDs, ICs, wires and sensors easy to find
- Learn, Modify and Create: Program the ELEGOO UNO R3 board with Arduino IDE using the included PDF tutorial and example code, then adjust sensor thresholds, timing, display text and motor behavior to turn guided lessons into original projects
- Flexible Power and Project Setup: Includes a 9 V, 1 A power supply, breadboard power module, 9 V battery and USB cable to support controller, breadboard and module experiments without sourcing basic setup accessories separately
A May 15, 2026 4/4 example maps a knob to 50–300 BPM, accents the first beat with a higher tone and a different LED, and signals beats two through four with other LEDs. Its page says the posted code represents its Tinkercad simulator setup and needs adjustment for the listed Modulino buzzer and knob, so do not assume that code is directly interchangeable with the Nano project. Arduino Project Hub: 4/4 Metronome With LEDs and Sound
Quick Recap
Best Value
- COMPLETE BASIC ELECTRONICS STARTER KIT: Build a strong foundation in electronics with an ELEGOO UNO R3-compatible controller board, breadboard, USB cable, LEDs, RGB LED, buttons, resistors, jumper wires, photoresistor, tilt switch, active buzzer and 74HC595 shift register for hands-on circuit and coding projects
- STEP-BY-STEP TUTORIAL FOR HANDS-ON LEARNING: Follow the included project tutorial with wiring guidance and example code to learn how electronic components connect and interact, helping beginners move from basic breadboard circuits to digital input, output, sensing and microcontroller programming projects
- UNO R3-COMPATIBLE BOARD FOR ARDUINO IDE: The included ELEGOO controller board can be programmed with Arduino IDE, providing a familiar platform for learning digital I/O, analog input, PWM control and basic coding while experimenting with LEDs, buttons, buzzers, light sensing and other circuit functions
- LEARN WITH REAL ELECTRONIC COMPONENTS: Explore how a photoresistor responds to light, how a tilt switch detects orientation, how buttons provide digital input, how a buzzer generates sound and how the 74HC595 shift register expands output control, turning individual parts into practical electronics experiments
- SOLDERLESS PROTOTYPING FOR STEM AND DIY PROJECTS: Use the breadboard and jumper wires to assemble, test and modify circuits without soldering, making the kit useful for STEM learning, classroom demonstrations, homeschool activities, maker projects, coding practice and anyone building introductory electronics skills
Rank #4
- Audible and visual indication!
- Adjustablel volume and BPM!
- Built-in speaker!
- Compact size!
- Electronic kit, assembly required
Choose the design around how you practice
- Tempo adjustment: The simple project uses a potentiometer, while the examples map a knob to their stated BPM ranges.
- Beat emphasis: A sweep gives motion, but measure accents require code that identifies a selected beat, such as the first or fourth.
- Sound: The simple project lists buzzers without showing the code that triggers them. Other examples illustrate tone-based beats, subject to their own hardware and simulator qualifications.
- Visual feedback: A back-and-forth LED sequence resembles a pendulum; separate beat indicators can instead mark each beat or accent.
- BPM display: The Nano project describes an OLED, but its listed 128×32 module does not match the sketch’s 128×64 configuration. A printed scale is the stated no-display alternative.
Practical verification checklist
- Confirm the potentiometer value and type, since the project page gives both 10 kΩ and 10–100 kΩ descriptions.
- Match the OLED’s actual resolution to the display dimensions configured in the sketch, or omit the display and use the suggested marked scale.
- Check the LED and resistor arrangement against a suitable circuit diagram before powering the board.
- Test the visual sweep independently. The posted sketch’s delay controls the LED steps, not a direct beat interval.
- If you want sound, add buzzer-control code and test that it works with your board and buzzer; the posted loop does not demonstrate audible output.
- Check the resulting tempo by ear or against a known timing reference before using the build for practice; the project page does not report accuracy testing.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

