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

Revision:
10:9d48af13dbd0
Parent:
9:ac887bf9f85d
Child:
11:2307c5edf18f
--- a/main.cpp	Fri Aug 19 15:24:12 2016 +0000
+++ b/main.cpp	Fri Aug 19 15:27:17 2016 +0000
@@ -12,8 +12,9 @@
 int input[100];
 bool start_flag = false;
 
+/*  start the game: animation/buzzer sounds */
 void start_level() {  
-    for(int i = 0; i < 2; i++) {
+    for(int i = 0; i < 3; i++) {
         right.setLevel(10);
         mid.setLevel(10);
         left.setLevel(10);