How to interface a regular servo motor with STM32. We will use the PWM signal to vary the angular displacement of the motor so that we…
Microcontroller Tutorials with Code from Scratch
Learn STM32, ESP32, and embedded systems by writing code from scratch using datasheets and reference manuals. All tutorials are tested on actual hardware to help you build reliable, real-world projects with full control and understanding.
What’s New in STM32
How to Interface ADXL345 (I2C) with STM32
Interface the ADXL345 Accelerometer, connected via the I2C, with STM32. We will display the results on the oled display, which is also…
How to Interface SSD1306 OLED with STM32
Learn to interface a 0.96″ SSD1306 OLED with STM32 via I²C: CubeMX config, wiring, init code, text & numbers display using HAL and SSD1306 library.
How to interface DHT22 sensor with STM32
This tutorial will cover how to interface the DHT22 Temperature and Humidity sensor with STM32. We will use the timer to generate…
How to Create a Precise µs Delay on STM32 Using HAL & Timer
Learn how to implement an accurate microseconds delay on STM32 microcontrollers (e.g., STM32F103) using CubeIDE, HAL library, and a timer. Step-by-step CubeMX configuration, code snippet, and oscilloscope-tested results.
STM32 TIMERS #1 How to Generate PWM Output
Learn STM32 PWM setup using HAL and CubeMX: configure timer prescaler & ARR, control duty cycle via CCR, and start PWM with sample code and visuals