Project Overview:
This was an assignment for my microcontroller programming and interfacing course, EE2028, and it is my favorite module taken in Y2S1. This interactive game was implemented on the STM32L4S5VIT6 microcontroller board by configuring GPIO pins, on-board peripherals, on-chip peripherals, like GPIOs, I2C, EXTI for external interrupts, and writing to sensor registers using C programming language, and writing the game logic using non-blocking C code.
Implemented non-blocking C code using HAL_GetTick() instead of blocking delays to meet real-time timing requirements.
Configured GPIO pins at register level for I2C operation, including mode selection, output type, pull-ups, and for read and writing data to registers.
Developed a deep understanding of the I2C protocol, including synchronous data transfer over SDA/SCL and multi-device bus operation.
Connected and managed multiple sensors on a shared I2C bus, following datasheet-specified pin mappings (I2C1).
Read and interpreted hardware datasheets to correctly configure peripheral and sensor registers.
Configured GPIO pins for sensor digital inputs/outputs and external interrupts (EXTI) using on-chip peripherals.
Implemented real-time communication via UART (Tera Term) and WiFi using TCP (Packet Sender), with the STM32 acting as a server.
Streamed live sensor telemetry to the ThingsBoard IoT cloud platform.
Integrated multiple sensors: temperature & humidity, accelerometer, gyroscope, pressure sensor, and magnetometer.
Programmed an OLED display using an external library and created timer-driven animations with frame toggling.
Implemented event-based alerts by triggering a buzzer when magnetometer thresholds were exceeded.
Used state flags and timer checks to coordinate concurrent tasks while maintaining fully non-blocking execution.
Learn more about my projects by looking at the resources below!
Also do check out my github repo to view the full project code and implementation.