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

History

fixed grammar default tip

2016-08-19, by jplunkett [Fri, 19 Aug 2016 17:04:26 +0000] rev 12

fixed grammar


added more comments

2016-08-19, by jplunkett [Fri, 19 Aug 2016 16:42:40 +0000] rev 11

added more comments


updated start level sounds

2016-08-19, by jplunkett [Fri, 19 Aug 2016 15:27:17 +0000] rev 10

updated start level sounds


added buzzer sound to start_level

2016-08-19, by jplunkett [Fri, 19 Aug 2016 15:24:12 +0000] rev 9

added buzzer sound to start_level


pretty code/working game

2016-08-19, by jplunkett [Fri, 19 Aug 2016 14:36:31 +0000] rev 8

pretty code/working game


fixed level/sequence bug

2016-08-19, by jplunkett [Fri, 19 Aug 2016 14:30:01 +0000] rev 7

fixed level/sequence bug


prettified

2016-08-19, by jplunkett [Fri, 19 Aug 2016 14:23:57 +0000] rev 6

prettified


added start game interrupts, animations, etc.

2016-08-18, by jplunkett [Thu, 18 Aug 2016 21:34:55 +0000] rev 5

added start game interrupts, animations, etc.


added button interrupts

2016-08-18, by jplunkett [Thu, 18 Aug 2016 19:43:09 +0000] rev 4

added button interrupts


cleaned up main function

2016-08-18, by jplunkett [Thu, 18 Aug 2016 16:47:00 +0000] rev 3

cleaned up main function