-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmode5.ino
29 lines (24 loc) · 939 Bytes
/
mode5.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**************************** MODE 5 *******************************/
/*
* Toy says name of colour.
* Kid puts it on colour.
* Positive feedback.
*
*/
//REDUNDANT - DONT USE IN FINAL TOY
void mode5() {
while(1) {
music.play("mode5_start.wav");
colourCode = random(0,9); //randomise colour
sayColour(colourCode); //say that colour's name, function written below
delay(1000); //delay of convenience
while(1) {
if (getColour() == colourCode) { //if colour is matched
music.play("positive_feedback.wav"); //audio feedback
flashRGB(colourCode); //light up
delay(1000); //delay of convenience
break; //break
}
}
}
}