/SkockoGame-STM32L4_with_OLED

Game about choosing the right combination of 6 characters.

Primary LanguageC

SkockoGame-STM32L4_with_OLED

About platform

Whole game is implemented on STM32L476RG microcontroller, with some aditional peripherals, like SSD1306 OLED display, 2x switch (buttons), 2x potentiometer, 2x 7-segment display.

About Game

Game is about choosing the right combination of 6 characters. You have 6 characters and 4 positions. On each position could be any character (they could repeat).

SkockoGame

System at work

Photo of SSD1306 OLED at beginning, at choosing single combination, at single result, at final result:

SkockoGame SkockoGame SkockoGame SkockoGame

Photo of UART terminal at middle of the game:

SkockoGame

Photo of UART terminal at the end of the game:

SkockoGame

About Hardware

On next photo is Block Schematic of System.

SkockoGame

About software

That's bare metal system (without any RTOS). Whole project relies on STM32 HAL functions. All user software was written in C++, so generaly project is mix of C++, C, and assembly (a little bit).

There on next photo you can see software architecture of this system.

SkockoGame

There on next photo you can see software architecture of ButtonPressedEventCallback function, which could not fit on above photo.

SkockoGame

Refferences

SSD1306 OLED:
https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
https://www.texim-europe.com/getfile.ashx?id=121863
I2C protocol:
https://www.pololu.com/file/0J435/UM10204.pdf
STM32L476RG:
https://www.st.com/resource/en/reference_manual/rm0351-stm32l47xxx-stm32l48xxx-stm32l49xxx-and-stm32l4axxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf