Leaf Piano

We made a piano using a touch sensor, as well as leaves for piano keys.

Similar projects worth following
Touch Sensor determines touch/release status based on electrode capacitance data changes, So we used it to make a piano with any conductive object we like as a piano key.

This is a very interesting project to make your own touch piano using leaves!!!!!

The video below will give you an overview of this project.

The code for leaf piano can be found under "LeafPiano" folder

x-zip-compressed - 16.59 MB - 04/12/2019 at 02:20


  • 1 × Seeeduino V4.2
  • 1 × Seeed Base Shield V2
  • 1 × Seeed Grove - 12 Key Capacitive I2C Touch Sensor V2 (MPR121)
  • 1 × Seeed Grove = MP3 v2.0

  • 1
    Hardware Connection

    Step 1: Copy the mp3 files to a SD card, name the folder as corresponding to the instrument's indexes and name the mp3 files same as corresponding to Touch Sensor channel's indexes.

    Step 2: Plug SD card to Grove - MP3, connect Grove - MP3 and Touch Sensor to port D2 and I2C port in Base Shield, connect conductive objects to Touch Sensor's channels via crocodile clips.

    Step 3: Plug the Base Shield to Seeeduino, then connect Seeeduino to PC via a USB cable.

  • 2
    Software Programming​

    Touch sensor's library can be found here:

    Grove - MP3 library also can be found in Seeed Wiki, or you can simply include MP3.h in project folder.

    Seeeduino's digital pin 2 and 3 act as a software serial, it controls MP3 Grove by using the protol in KT403A datashell. After Grove MP3 and Touch Sensor are initialized, set Touch Sensor's sensitivity and Grove - MP3's volume.

    The loop() method keep on checking if Touch Sensor is touched or not, if it is touched, play the corresponding mp3 file in current instrument folder. Current insreument can be changed by input instrument's index via hardware serial.

View all instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates