Рет қаралды 264,660
Let’s take our STM32 to the next level and communicate with a sensor. We’ll use the I2C protocol to send and receive messages with a TI TMP102.
In this video, we’ll show you how to use the STM32CubeIDE to create a new project and write a few simple STM32 HAL commands to transmit messages across the I2C bus. We’ll read temperature data from a TMP102 sensor and then calculate a readable temperature in Celsius from that information. Finally, we’ll use the STM32’s UART peripheral to transmit that temperature data back to our computer to read on a serial console.
The STM32 series is based on the ARM Cortex architectures. Specifically, we’ll be looking at the STM32 Arm Cortex-M microcontrollers. To make life easier, we’ll be using STMicroelectronics’ official Nucleo development boards (the Nucleo-L476RG in particular).
WRITTEN TUTORIAL
If you would like to see the steps performed in this video in written form, please see the tutorial here: www.digikey.co...
Wishlist (shared cart): www.digikey.co...
ADDITIONAL RESOURCES
Related Projects www.digikey.co...
Download STM32CubeIDE: www.st.com/en/...
STM32 HAL documentation (click on family from graphic and then Resources tab) : www.st.com/en/...
SparkFun I2C Tutorial: learn.sparkfun...
Maker.io: www.digikey.co...
Digi-Key’s Blog - TheCircuit: www.digikey.co...
Connect with Digi-Key on Facebook: / digikey.electronics
And follow us on Twitter: / digikey