Commit 8c35be75 authored by Patrick's avatar Patrick

complete game sound run through, with random theme

parent c65f08f9
......@@ -7,26 +7,32 @@ SoftwareSerial mySerial = SoftwareSerial(8, 9);
SOMO_II mp3 = SOMO_II(mySerial);
void setup() {
mySerial.begin(9600);
mySerial.begin(SOMO_BAUD);
mp3.begin();
Serial.begin(9600);
Serial.begin(115200);
Serial.println(F("starting play_test"));
}
void loop() {
Serial.println(F("playing countdown"));
mp3.playFile(1,5);
delay(1000);
mp3.playFile(1,4);
delay(1000);
mp3.playFile(1,3);
delay(1000);
mp3.playFile(1,2);
delay(1000);
mp3.playFile(1,1);
delay(1000);
mp3.playFile(1,6);
delay(1000);
int playlist[6] = {5, 4, 3, 2, 1, 6};
for (int i=0; i<6; i++) {
Serial.print(F("playing: "));
Serial.print(playlist[i]);
int err = mp3.playFile(1,playlist[i]);
if (err != 0) {
Serial.print(F(", err: "));
Serial.print(err);
}
Serial.println();
delay(1000);
}
// play a game file
mp3.playFile(1,random(10, 13));
// for 30 seconds
delay(30000);
// go boom
mp3.playFile(1, 8);
delay(5000);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment