Skip to the content.

Robot

Photograph of micro:bit robots

There are many BBC micro:bit robot accessories, which the micro:bit slots into to provide a “programmable robot brain”. We have worked with a handful of these robots to develop a platform approach that will make it simpler for teachers and students to work with a wide variety of micro:bit robots. Our hope is that all micro:bit robots will eventually be supported by this platform.

The platform is based on a robust robot controller, written using MakeCode, that runs on the robot (micro:bit V1 or V2) and exposes a radio protocol to communicate with another micro:bit, running the user’s program. The robot controller code is written using MakeCode for the micro:bit and has a common set of programming blocks.

A diagram showing how MicroCode is communicating with the robot

Robot features

MicroCode programming

MicroCode provides a simplified programming experience for robots that are equipped with two motors, sonar and line sensors. The user’s code can be updated very quickly using the Arcade shield.

robot blocks showcase

Preparing the robot micro:bit

You will need one of the supported micro:bit robots and an extra micro:bit (v1 or v2) to run on the robot.

Configuring the radio group

The MicroCode editor and the robot micro:bit communicate using the radio. These are the steps to configure the robot and the MicroCode:

On the robot micro:bit,

The radio group is stored in the flash of the micro:bit and will be used every time the robot is reset. (However, it will be erased if you download another .hex file).

On the MicroCode side,

setting radio group 3 on page start

Calibrating motor drift

It is not uncommon for 2 wheeled robot to slightly drift towards one side. To correct this behavior, you can configure a drift parameter on the robot.

On the robot micro:bit,

robot drift tester

The robot drift tester program above lets you test the drift for medium and high speeds. Clap or shoot to stop the robot.

The drift value will be stored in the flash of the micro:bit and will be used every time the robot is reset. (However it will be erased if you download another .hex file, so you might want to write it down somewhere).

Tiles

The tiles are documented in the language robot section.

Samples

The samples are listed on the samples page.

Troubleshooting

This is a quick check list to make sure you have the best experience with the MicroCode robot:

Add your robot

We accept pull requests to add new robots. See the contributing page for more details.