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.
Details
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.
Files
Projects-master.zip
The code for leaf piano can be found under "LeafPiano" folder
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.
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.