Discover Arduino Projects
Hundreds of projects from beginner to advanced — schematics, code, and videos.

Using a Buzzer
Ever wondered how a doorbell or an alarm makes its sound? The Arduino makes a small buzzer beep at short intervals: beep, pause, beep, pause.

Raspberry Pi Pico Parking Sensor (HC-SR04 + 3 LEDs + Buzzer)
Bring your car's reverse parking sensor to your desk! The Raspberry Pi Pico uses an HC-SR04 ultrasonic sensor to measure the distance to an obstacle about 16 times a second. As it gets closer, the green, yellow and red LEDs light up in turn and the buzzer beeps faster; under 10 cm the tone turns continuous and the red LED flashes. Ultrasonic ranging, PWM sound and non-blocking timing in one project.

Raspberry Pi Pico Button Piano (5 Buttons + Buzzer + Melody Recorder)
A five-key mini piano that remembers what you play! The Raspberry Pi Pico plays DO, RE, MI, FA and SOL on a passive buzzer from five buttons, and a note lasts as long as you hold its key. Hold DO for a second, play your tune, then hold DO again: the Pico plays it back, shortening silences longer than 1.5 seconds between notes to 1.5 seconds. The record indicator is the LED already on the board, so no extra parts. PWM notes, debouncing and non-blocking timing in one project.

ESP32 Bluetooth Parking Sensor (HC-SR04)
Measure the distance to an obstacle with an HC-SR04 and watch it on your phone; the buzzer beeps faster as it gets closer. No internet needed. This is the step-by-step guide to the Parking sensor Bluetooth template in the app, built with an ESP32. Go to Workshop › Devices › Add a device › Bluetooth, pick Parking sensor and upload the code with Get the code. The Set up as a Bluetooth panel button on this page opens the wizard with this template too.

ESP32 Bluetooth Phone Piano
Turn your phone into an 8-key piano: press a key and a passive buzzer on the ESP32 plays that note, no internet or Wi-Fi needed. This is the step-by-step guide to the Phone piano Bluetooth template in the app, built with a buzzer and two jumper wires. Go to Workshop › Devices › Add a device › Bluetooth, pick Phone piano and upload the code with Get the code. The Set up as a Bluetooth panel button on this page opens the wizard with this template too.

First Melody with mBot: Play Notes on the Buzzer
The buzzer on the mBot's board plays the first two lines of a well-known children's song (Twinkle Twinkle Little Star), waits 2 seconds and starts over. No extra parts are needed. Every note is a frequency (Hz) and a length; the melody lives in two lists, one with the notes and one with the beat counts. The tone command plays a note and waits until it is over.

mBot Melody Picker: Press the Button, Change the Tune
Every press of the button on the mBot's board makes the buzzer play the next melody. There are three short melodies; after the third it goes back to the first. No extra parts are needed. The melodies live in one table: one melody per row, eight beats each. Pressing the button while a melody plays changes nothing, because tone holds the code until the note is over.

ESP8266 Web Doorbell: Tap the Bell on Your Phone and the NodeMCU Plays Ding Dong
Tap the round bell button on a web page and the buzzer on your breadboard plays ding dong twice. The NodeMCU V3 joins your home Wi-Fi and serves a doorbell page; any phone on the same network can ring it. The melody is timed with millis, not delay, so the board keeps answering the page while it plays, and the page counts how many times the bell has rung. The buzzer must be a passive one: an active buzzer makes a single sound. The ESP8266 only joins 2.4 GHz networks.

Ticklish micro:bit: A Board That Giggles When You Touch the Logo
Touch the gold logo above the display: the micro:bit giggles and its face wiggles left and right, then calms down when you take your finger away. pin_logo.is_touched senses the touch and audio.play plays the sound. No extra parts are needed.

micro:bit Pocket Doorbell: Ding Dong
Press button A and the onboard speaker plays a two-note doorbell. Button B plays a built-in tune; a note shows while it plays and a house while it waits. music.play plays the notes. No extra parts are needed.

micro:bit Clap Lamp
Clap once and the whole LED display lights up like a lamp; one more clap turns it off. The onboard microphone hears the sound (was_event) and set_threshold sets the level. No extra parts are needed.
