-
1Hardware 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.
-
2Software Programming​
Touch sensor's library can be found here:
http://wiki.seeedstudio.com/Grove-12_Key_Capacitive_I2C_Touch_Sensor_V2-MPR121/
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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.