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
-
Cybersecurity: Radio Tilt Control
-
Measure Accelerometer Tilt
-
Test Tilts
-
A Bit About Acceleration
-
Inside the micro:bit Accelerometer
-
How the Project Works
-
Try This: Take X and Y Rotation Samples
-
Your Turn: Combine Tilt and Rotation
-
Measure Rotation Angles
-
Measuring Rotation Angles
-
How Measuring Rotation Angles Works
-
Did You Know? Trigonometry and Rotation Angles
-
Measure How Far from Vertical or Level
-
How It Works
-
Z-Axis: Which Way Is Up?
-
How it Works: Z-axis
-
Did You Know? This Way Up
-
Try This: Get Familiar Z-Axis Angle Measurements
-
Your Turn: All Together Now
-
Display Tilt Direction
-
Your Turn: Display Tilt Direction
-
Tilt Radio Tests
-
Radio-Transmit Tilt
-
Radio-Receive Tilt
-
How the Tilt Radio Tests Work
-
Tilt Control Forward & Backward
-
Rapid Radio-Transmit Tilt Data
-
Rapid Radio-Receive Tilt Plus Forward/Backward Control
-
Adding a Stop Range
-
Transmitter Displays Stop Range
-
Receiver Full Tilt Control & Stop Range
-
Add Left/Right Tilt Control
-
Update the Receiver cyber:bot project
-
How the Receiver Works
-