Microbit Robo:Bit radio control

The objective is to control a Robo:Bit remotely using a microbit

Be the quickest around the course to win

Introduction

The Robo:Bit mk3 is a buggy controlled by a microbit. You are going to use another microbit as a remote control for the buggy. The microbit runs hex files. You will be given working but incomplete hex files to download.

In pairs: One computer each. Download one of the codes each. Import this code into the makecode editor. (Import button on right hand side of makecode home page).

Choose a new radio group (0 to 255) and set the group in both codes. Download your completed codes and transfer them to the microbits. (Use "Save as..." for example)

makecode homepage

Controller code

The controller hex file can be downloaded below:

The controller should transmit "A:1" or "A:0" depending if A is pressed and "B:1" or "B:0" depending if B is pressed. There is one block missing from the code for this part.

If the controller is tilted backwards it should transmit "R:1" but there is a mistake to correct here.

Match your radio group. Once you have got it working can you improve it?

tx (controller) hex

Robo:Bit code

The Robo:Bit hex file can be downloaded below:

The Robo:Bit receives the messages from the Controller so make sure you have the same radio channel. In the code that responds to the messages there are two missing blocks to put in.

The code also has an algorithm that makes the buggy back away from obstacles as well as one to respond to the radio messages.

You may need to get the bitbot block from the extension packages to make more improvements.

rx (Robo:Bit) hex