Back to Projects
SensorsBeginnerESP32BuzzerBeginner

Tone Melody Piano

Make a tiny piano using ESP32 + buzzer

Overview

Play notes by pressing buttons or touch pads — the ESP32 generates tones on a buzzer.

How It Works

The ESP32 has built-in capacitive touch sensors on certain GPIO pins (Touch0–Touch9). When a student touches an exposed wire or aluminum foil pad connected to a touch pin, the touchRead() value drops below a threshold. The code maps each touch pin to a musical note frequency (C, D, E, F, G, A, B) and plays it on the buzzer using the ledcWriteTone() function, which generates a precise square wave at the desired frequency.

What You Will Build

A complete, working tone melody piano using real ESP32 hardware, sensors, and motors. You will take it home once the course is complete.

Hardware Components

ESP32 Dev Module
Active Buzzer
Breadboard (full size)
Jumper Wires (40-pcs set)

Project Details

CategorySensors
DifficultyBeginner
Time1–2 Hours Build
Classes1–2 Classes

Full Build Guide

Wiring diagrams, step-by-step build instructions, full code, and troubleshooting — available after enrollment.

Book a DemoBook 30-min Consult