Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Accelerometer.c
Accelerometer.h
DisplayData.c
DisplayData.h
Gyro.c
Gyro.h
LinkerScript.ld
Makefile Created subdirs based on MCU dev board name Jan 15, 2018
README.md
RegisterAddresses.h
StartOpenOCD.bat
StringUtilities.c
StringUtilities.h Created subdirs based on MCU dev board name Jan 15, 2018
UART.c
UART.h
main.c
startup_stm32.s

README.md

STM32 Gyroscope / Accelerometer

The STM32F411 development board comes equipped with an accelerometer and gyroscope on-board. In this example I show how to communiacte with these devices in realtime, displaying output to a terminal program like PuTTY. The code is well documented explaining what every non-obvious line of code does. In order to best understand how the software communicates with the hardware I don't use the HAL of Standard Peripheral Library.

 

Hardware Prerequisites

  1. An STMF32F411 development board. Currently they can be ordered from the usual sites for around $15 USD plus shipping.
  2. A USB to TTL Serial Cable like this one from AdaFruit.

 

Video Demo

STM32 Gyroscope and Accelerometer Demonstration