Learn how to connect and read data from a DHT11 temperature and humidity sensor using STM32 and HAL libraries. Includes circuit, timing details, and complete code examples.
STM32 Projects & Tutorials
STM32 microcontrollers are widely used in embedded and industrial systems. This section offers practical tutorials and tested code for STM32F103, STM32F4, and Nucleo boards. Programming is done using STM32CubeIDE with both HAL and LL drivers. Topics include GPIO, UART, ADC, timers, and other core functions—ideal for learners and developers working on real hardware.
How to Control a Servo Motor with STM32 using PWM (HAL + CubeMX Tutorial)
Learn how to control a servo motor using STM32 and PWM with HAL library and CubeMX. Step-by-step guide with circuit, code, and timer setup.
Interfacing ADXL345 Accelerometer with STM32 via I2C – Complete Tutorial with Code
Learn how to interface the ADXL345 3-axis accelerometer with STM32 using I2C. This step-by-step tutorial includes CubeMX setup, HAL-based code, register configuration, and real-time data display on OLED.
THis tutorial will cover how to interface the BME280 pressure sensor / Barometer with STM32. The sensor is connected to the MCU via the I2C..
STM32 SPI Communication Example – HAL Read/Write with ADXL345
Learn STM32 SPI with HAL. Configure SPI in CubeMX and perform read/write with ADXL345 sensor using HAL_SPI_Transmit and HAL_SPI_Receive.
How to Interface GC9A01 Round Display with STM32 Using SPI + LVGL Integration
Learn how to interface the GC9A01 round TFT display with STM32 via SPI and implement LVGL for rich embedded GUIs. Step-by-step guide to wiring, code, and rendering graphics with LVGL.
Display Analog Clock on GC9A01 Using STM32 + LVGL + SquareLine Studio (Part 2)
Learn how to display an analog clock on the GC9A01 round display using STM32 and LVGL. Use SquareLine Studio to design the GUI. Includes code, design steps, and integration tips.
STM32 Input Capture Example – HAL_TIM_IC_CaptureCallback for Frequency, Pulse Width
Learn STM32 input capture using HAL. Use HAL_TIM_IC_CaptureCallback to measure signal frequency and pulse width with timers and interrupts.
STM32 ADC Tutorial | Single Channel Polling Mode with Example Code
Learn how to configure STM32 ADC in polling mode. Step-by-step tutorial with example code for STM32F103, F446, and H750 MCUs.