Stap 2: Code
1. begin met het schrijven van de code, met behulp van C
//import all
#define VOLUME 1<br>
int flexiForcePin = A0; //analog pin 0
SdFat sd;
SFEMP3Shield MP3player; //to board
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (sensor >= 200){
if (count > 10){
count == 1;
}
if (count == 1){
MP3player.playTrack(1.mp3);
}
if (count == 2){
MP3player.playTrack(2.mp3);
}
if (count == 3){
MP3player.playTrack(3.mp3);
}
if (count == 4){
MP3player.playTrack(4.mp3);
}
if (count == 5){
MP3player.playTrack(5.mp3);
}
if (count == 6){
MP3player.playTrack(6.mp3);
}
if (count == 7){
MP3player.playTrack(7.mp3);
}
if (count == 8){
MP3player.playTrack(8.mp3);
}
if (count == 9){
MP3player.playTrack(9.mp3);
}
if (count == 10){
MP3player.playTrack(10.mp3);
};
}
count++
}