In STM32 Lecture 5, you’ll learn how to send data from one STM32 board to another using I²C, and how to interface real external sensors like temperature sensors and accelerometers — explained step by step and without confusion.
This lecture is designed for beginners and early intermediate learners who want practical, real-world STM32 skills, not just theory.
Time Stamp
00:00 - Reviewing I2C concepts: pins (SDA, SCL), modes, and master-slave communication.
05:52 - Creating a new STM32 project in CubeIDE for I2C communication.
08:15 - Configuring I2C1 as Master and I2C3 as Slave on the same controller.
08:58 - I2C Parameter settings: Standard mode and speed configurations.
09:54 - Enabling I2C interrupts in NVIC settings (Event and Error interrupts).
10:11 - Identifying I2C1 pins: PB8 (SCL) and PB9 (SDA).
11:33 - Configuring I2C3 (Slave) parameters and setting the slave address (0x12).
14:15 - Identifying I2C3 pins: PC0 (SCL) and PC1 (SDA).
15:32 - Writing the code: Creating Transmit (TX) and Receive (RX) buffers.
19:05 - Implementing HAL_I2C_Master_Transmit in the main while(1) loop.
21:10 - Explanation of bit shifting the slave address for register read/write.
23:53 - Setting up HAL_I2C_Slave_Receive_IT to initiate interrupt-based reception.
28:30 - Implementing the Slave Receive Complete Callback function (HAL_I2C_SlaveRxCpltCallback).
35:40 - Physical wiring: Connecting master and slave pins with jumper wires.
37:00 - Using the schematic to find the physical pin locations (CN5 and CN8 connectors).
45:00 - Recap of the I2C configuration and coding workflow.
53:10 - Q&A: Troubleshooting schematic issues and identifying LED/Switch pins on different boards.
🔍 What you’ll learn in this video:
What I²C is and how it actually works
STM32 I²C Master–Slave communication
Sending & receiving data between two STM32 boards
Interfacing I²C sensors (temperature, accelerometer)
Understanding HAL I²C functions clearly
Common I²C mistakes and how to avoid them
Whether you’re learning STM32 for college, projects, or embedded jobs, this video will give you a solid foundation in I²C communication.
#STM32,#I2C,#EmbeddedSystems,#STM32Tutorial,#I2CCommunication,#Microcontroller,#EmbeddedProgramming,#STM32CubeIDE,#STM32HAL,#ElectronicsEngineering,#EmbeddedC,#SensorInterfacing,#I2CTutorial,#STM32Beginner,#EmbeddedLearning,#BoardToBoardCommunication,#STM32Projects,#TemperatureSensor,#Accelerometer,#EmbeddedTutorial,#EngineeringStudents,#LearnEmbedded,#MCU,#ElectronicsTutorial,#STM32Lecture,#I2CBus,#FirmwareDevelopment,#EmbeddedSkills,#STMicroelectronics,#IoTBasics
📌 Perfect for:
Embedded systems beginners, STM32 learners, electronics students, and anyone confused by I²C.
If this video helps you, like, subscribe, and comment — it really supports the channel and helps others find this content.