STM32 Gyroscope / Accelerometer Demo (Video Included)

A number of the STM32 development boards come equipped with a MEMS gyroscope and accelerometer. As shown in the video below, I've written software which displays values from both of these devices in realtime.


In my example, I'm using an STM32F411 development board. As shown on the databrief the board comes with both a L3GD20 MEMS gyroscope and a LSM303DLHC MEMS accelerometer.

Software I've written (which can be found in my GitHub repo here) continually reads data from both devices, displaying the output to a terminal program using a UART connection. I use a USB to serial cable like this one from AdaFruit to connect the STM32F411 board to a PC. I then use a terminal program like PuTTY to view the gyroscope and accelerometer output in realtime.

My software for this project is well commented, explaining every non-obvious line of code. Any questions, just let me know, I'll be happy to discuss this project farther - contact info here.

Date: December 3rd, 2017 at 6:37pm
Author: Terence Darwen
Tags: Embedded, STM32, STM32F4, ARM-Cortex-M4, STM32F411, Gyroscope, Accelerometer

Previous Next