Play Japanese music with a buzzer on Arduino/ESP32
This project plays the song 千本桜 (Senbonzakura) through a passive buzzer, compatible with both Arduino and ESP32 boards.
You can try it directly on Wokwi without any physical hardware!
(Original song on YouTube – this project recreates its melody)
💻 Click to run: Senbonzakura on Wokwi
No download needed – just open the link and click ▶ Start Simulation.
- Arduino Uno, Nano, or ESP32
- Passive buzzer
- Breadboard jumper wires
Sample wiring:
| Buzzer Pin | Arduino/ESP32 Pin |
|---|---|
| + (VCC) | GPIO 2 (can be changed) |
| - (GND) | GND |
The main.ino file contains:
- melody[] array: note frequencies for Senbonzakura (defined in
pitches.h) - noteDurations[] array: note lengths (beats)
tone()function to play notes- Delay between notes to create pauses
- Open Arduino IDE
- Select Board: Arduino Uno / ESP32
- Select the correct Port (COM5, COM8, ...)
- Download the
pitches.hfile (included in the repo) - Upload the code to your board and enjoy the music 🎶
Because I heard this and felt it funny Senbonzakura so I wanted to turn it into a buzzer version to both practice and share the joy with others.
© 2025 DuyetBKU — Made with C++ and a love for embedding.
