Test Tilts
Let’s test tilts: level, left, right, toward, and away from you.
When you vary the tilt angle from left to right, the x-axis accelerometer measurement values vary accordingly.
When you vary the tilt angle from facing toward you to facing away from you, the y-axis accelerometer measurement values also vary accordingly.
Example project: test_tilts_intro
- Enter this project and name it test_tilts_intro.
- Flash the project into the micro:bit
- Open the terminal at Google Chrome Labs Serial Terminal.
- Take measurements as shown in the animation, recording the x and y values for each tilt angle in the table below the animation.
Direction |
Angle | X |
Y |
Vertical facing away | 90° | 0 | 1024 |
Mostly facing away | 60° | ||
Slightly facing away | 30° | 0 | 512 |
Level | 0° | ||
Slightly facing towards you | -30° | ||
Mostly facing towards you | -60° | ||
Vertical facing towards you | -90° | ||
Vertical facing left | 90° | ||
Mostly tilted left | 60° | 888 | 0 |
Slightly tilted left | 30° | ||
Level | 0° | ||
Slightly tilted right | -30° | ||
Mostly tilted right | -60° | ||
Vertical facing right | -90° |