Code Ideas and Examples
We’ve thought of a few programs that work well in demonstrations, open days or at any event where you want to show off MiRo’s sensors, movement and programmability. The guides will provide an image of the Blockly code, a description and an extension. The code will download onto your computer and this can be loaded straight into MiRoCODE using MiRoCODE’s load function. For a reminder on how to send your code to your physical robot, click here.
Clapper Control MiRo
This demonstration program gives you control over MiRo’s movement using claps. Move MiRo forward, stop, turn and stop turning to try and get MiRo to knock over the cans!
Clap and Nod
This demonstration program uses counters to hear a series of claps which causes MiRo to nod in response. This all runs within recorded and counted loops.
Cheer MiRo Up
This demonstration program gives MiRo some emotions! It correlates caring head and body touches with happiness levels, which is displayed using MiRo’s lights, ears and eyes.
Don’t Fall Off!
This demonstration program moves MiRo forward and then uses MiRo's sonar sensors to try and reach the edge of the table and stop itself before falling off!
Play a Tune
This demonstration program works excellently on the physical robot by assigning a different tone output to each body sensor. This means you can use MiRo to compose a range of melodies!
Watch the Edge!
This demonstration program moves MiRo around and uses the cliff sensors to detect if near to a table edge. MiRo will then move away from the edge and change direction.
To and Fro
This demonstration program allows you to control MiRo's speed by using the head and body touch sensors to increase or decrease the speed, so lets you move MiRo forwards or backwards.
Call the Ambulance!
This demonstration program turns MiRo into a spinning ambulance (flashing blue and red) if the body touch sensors are activated. Change the colours and patterns to restyle MiRo’s look.