A simple Simon Says game using a Grove Base Shield, 3 Grove LED Bars, 1 Grove Buzzer, and 3 Grove Buttons.

Dependencies:   LED_Bar mbed

Components Used

Platform: ST-Nucleo-F401RE

Components / Grove Shield V2
As an expansion board, Base Shield v2 has many Grove connectors, making it convenient for you to use Grove products together
Digital on / off buzzer
Seeed Grove Button module with digital interface
The Grove LED Bar is comprised of a 10 segment LED gauge bar and an MY9221 LED controlling chip.

Component Configuration

LED_Bar mid(D6, D5);    //D5
LED_Bar right(D8, D7);  //D7
LED_Bar left(D4, D3);   //D3
InterruptIn button_left(A2);
InterruptIn button_mid(A1);
InterruptIn button_right(A0);
DigitalOut buzzer(D2);

Gallery

Files at this revision

API Documentation at this revision

Comitter:
jplunkett
Date:
Fri Aug 19 17:04:26 2016 +0000
Parent:
11:2307c5edf18f
Commit message:
fixed grammar

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Aug 19 16:42:40 2016 +0000
+++ b/main.cpp	Fri Aug 19 17:04:26 2016 +0000
@@ -10,7 +10,7 @@
 DigitalOut buzzer(D2);
 /*  due to the type of InterruptIn .rise function call I am using (callback to
     a void function), the input array has to be global since you can't use 
-    input parameters (to my knowledge in the interrupted void function */
+    input parameters (to my knowledge) to the interrupted void function */
 int input_index;
 int input[100];
 bool start_flag = false;