Note: This is an university coursework. Permission had been obtained from the module lead to upload the project files to GitHub.
This is a simple brick breaker game, made up of:
- STM32 NUCLEO-F401RE board
- Joystick
- PIMORONI 11x7 LED Matrix Breakout (Powered by an IS31FL3731 driver chip).
The project is created using STM32CubeIDE
Score and Other Info:
Via UART2 (STLink USB) at baud rate 115200, 8 bits data, no parity, 1 stop bit
Clock speed of the game main can be viewed via the flashing frequency of the on board LED (LD2, Green)
Function | Control |
---|---|
Pause / Continue Game | Short CLICK Pushbutton |
Left Shift Paddle | Joystick LEFT |
Right Shift Paddle | Joystick RIGHT |
Increase Game Clock Speed (Bonus ++) | Joystick UP |
Decrease Game Clock Speed (Bonus --) | Joystick DOWN |
Engage (Disengage) Autoplay | Long PRESS Pushbutton |
Initial Bonus = 1
WIN -> All blocks cleared.
- Score = Score + Bonus
- Game main clock speed automatically increases once, reset bonus: Bonus = 1
LOSE -> Ball fall off from the bottom line
- You lose all the scores
Difficulty Adjustment -> Joystick UP / DOWN
- Increase clock speed: Bonus ++
- Decrease clock speed: Bonus --
Pin | State | Connect To |
---|---|---|
PB6 |
I2C1_SCL | LED Matrix SCL |
PB7 |
I2C1_SDA | LED Matrix SDA |
PA12 |
GPIO_Input (Pull Up) | Joystick Pushbutton |
PA6 |
ADC1_IN6 | Joystick VRX |
PA7 |
ADC1_IN7 | Joystick VRY |
PB0 |
ADC1_IN8 | Leave Floating (to generate random numbers) |
PA5 |
GPIO_Output | LD2 |
Important: All Vcc of the peripherals should be connected to 3.3V