In this video I build up a simple electronic game based in part on the 1970s "Simon" game. I chose a Black Pill STM32F411CE based board but this could be equally done with the cheaper "Blue Pill"
I was inspired in this by Big Clives teardown
• Inside one of the first electronic ga...
and there is a fantastic reverse engineering of the game here:
https://www.waitingforfriday.com/?p=586
All the code and schematic is here
https://github.com/thaaraak/Black-Pil...
Finally the Timer calculator is here
https://www.mikroe.com/timer-calculator
0:00 Intro
1:51 Game Demo
2:57 Schematic
5:57 A note on the STLink Programmer
6:43 Setting up the STMCube project
7:30 Setting up Timers/PWM
8:20 How to create the right Frequency using Prescaler/Period
9:58 The Timer Calculator program
11:42 Programming a tone
14:08 The LEDs
17:15 Setting up the Buttons
22:58 Using the Bounce2 debounce code
25:38 Code Explanation - State Machine
28:20 Code Explanation - Class Structure
Bill of Materials
STM32411 Black Pill (or Blue Pill STM32F401)
LM386
4 x LEDs red, green, blue, yellow
4 x Push button switch
50k Pot
4 x 2N3904
4 x 220 ohm
4 x 3.3k ohm
100 uF, 22uF, 220uF
2 x .1 uF
7805 5V Regulator