Cybersecurity: Radio Tilt Control

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.
  • Jump down to the Radio Tilt Controlled cyber:bot App at the end of this tutorial.


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 python.microbit.org on a Chrome browser
    -- or --
  • Mu editor installed

Complete these lessons first from the cyber:bot Tutorial Series:

  • Required
    • Software Setup for micro:bit
    • Writing micro:bit programs
    • Computer – micro:bit Talk
    • Add modules to your micro:bit
    • Build your cyber:bot
    • Navigation with the cyber:bot
  • Recommended
    • Dictionary Primer
    • Exception Handling
    • Cybersecurity: Radio Basics
    • Cybersecurity: Radio Data
    • Cybersecurity: Navigation Control from a Keyboard

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