1. Introduction
Self-levelling camera mounts and simple digital spirit levels both need a way to measure how far something has tilted from level, not just whether it has tilted at all. In this experiment, an analog tilt sensor module is wired to the STM32F070RB's analog to digital converter, and a continuously updating estimated tilt angle is printed over UART.
2. Scope
This experiment covers reading an analog tilt sensor's graduated output through the ADC, and applying a linear scaling formula to convert the raw reading into an approximate tilt angle in degrees. This provides a graduated, continuously variable alternative to the simple binary tilt switches used elsewhere in this series.
3. Prerequisite
3.1 Hardware
-
STM32 Nucleo-F070RB development board
-
Analog tilt sensor module
-
Breadboard and jumper wires
-
Micro-USB cable
-
PC with PuTTY
3.2 Software
-
STM32CubeMX (standalone)
-
STM32CubeIDE
-
ST-LINK USB driver
-
PuTTY, or an equivalent serial terminal application
Community Q&A
1 questionAsk questions and get answers from our community and staff moderators.
how it works? (inside it)
Ask a Question
Please log in to ask a question or post a reply.
Login to Participate