What it’s about
Control a cyber:bot by tilting a micro:bit! The controller micro:bit measures tilt with its accelerometer, and sends that information to the cyber:bot with its radio. The cyber:bot receives the radio-transmitted tilt data and uses it to set its wheel speeds.
This tutorial can be approached in two ways:
I just want to tilt-control my cyber:bot!
- Check the Before you start list below to make sure you are ready.
- Do the Radio Tilt Tests section to make sure your controller micro:bit and receiver cyber:bot are communicating data properly.
I want to learn about developing this kind of app and how an accelerometer works, or I’m in a class and it’s required:
- Check the Before you start list below to make sure you are ready.
- Go through the activities sequentially to learn about accelerometer sensing, tilt angle calculations, radio tests, forward/backward control, add stop range, left right control, and adding exception handling.
Before you start
You will need:
- A fully built and tested cyber:bot robot
- One additional micro:bit module (on or off a cyber:bot)
- Two USB A to MicroB cables
- One or more computers with:
- Access to makecode.microbit.org on a browser
- Access to Google Chrome Labs Serial Terminal on a browser
Complete these lessons first from the Change this link cyber:bot Tutorial Series:
- Required
- Recommended
After you finish
If you go through the tutorials sequentially, you will gain experience with:
- How an accelerometer works
- How sensing axes can be more or less aligned with gravity
- How a capacitive accelerometer detects acceleration and gravity forces
- Trigonometry tricks for calculating tilt angle from accelerometer measurements
- Scaling sensor values for speed/direction control
- Incremental maneuver feature addition
- Using key-value pairs to simplify data exchange between devices in a cyber:bot app. This was introduced in Cybersecurity: Radio Data
Curriculum
- 1 Section
- 33 Lessons
- Lifetime
Expand all sectionsCollapse all sections
- Cybersecurity: Radio Tilt Control33
- 1.0Measure Accelerometer Tilt
- 1.1Test Tilts
- 1.2A Bit About Acceleration
- 1.3Inside the micro:bit Accelerometer
- 1.4How the Project Works
- 1.5Try This: Take X and Y Rotation Samples
- 1.6Your Turn: Combine Tilt and Rotation
- 1.7Measure Rotation Angles
- 1.8Measuring Rotation Angles
- 1.9How Measuring Rotation Angles Works
- 1.10Did You Know? Trigonometry and Rotation Angles
- 1.11Measure How Far from Vertical or Level
- 1.12How It Works
- 1.13Z-Axis: Which Way Is Up?
- 1.14How it Works: Z-axis
- 1.15Did You Know? This Way Up
- 1.16Try This: Get Familiar Z-Axis Angle Measurements
- 1.17Your Turn: All Together Now
- 1.18Display Tilt Direction
- 1.19Your Turn: Display Tilt Direction
- 1.20Tilt Radio Tests
- 1.21Radio-Transmit Tilt
- 1.22Radio-Receive Tilt
- 1.23How the Tilt Radio Tests Work
- 1.24Tilt Control Forward & Backward
- 1.25Rapid Radio-Transmit Tilt Data
- 1.26Rapid Radio-Receive Tilt Plus Forward/Backward Control
- 1.27Adding a Stop Range
- 1.28Transmitter Displays Stop Range
- 1.29Receiver Full Tilt Control & Stop Range
- 1.30Add Left/Right Tilt Control
- 1.31Update the Receiver cyber:bot project
- 1.32How the Receiver Works