Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

STM32 Tutorial #21 – I2C Read and Write

3.4K views on YouTube

In this tutorial video we will read from and write to a I2C device. The video also describe the difference between Big- and Little-Endian MCU’s.

Site: https://stm32world.com/wiki
Source for this example: https://github.com/STM32World/stm32fun/tree/master/stm32world_i2c2
The device and datasheets: https://stm32world.com/wiki/DFRobot_10_DOF

Project Files: https://github.com/STM32World/stm32fun

00:00 Intro and Recap
01:20 Reading the datasheet
05:15 Explaining endianness
10:04 Implementing a function to read calibration data
17:30 Running buggy code and sorting out the mistake
21:20 Flipping the bytes to fix endianness
23:00 Using Memory Read function to simplify code