Skip to content

Challenge Set

Overview

The following tasks are designed to help you apply what you have learned by building your own MiRo behaviours. Start simple, then extend each task if you have time.

Save your code

Save your MiRoCODE programs regularly — you may want to reuse parts of them later.
You may wish to create a dedicated folder on your U: drive to keep your files organised.


1. Hitting the cans

Program MiRo to move from its starting position and collide with the stack of cans on the left 💥.

Focus on:

  • Sequencing movement and turns using action blocks
  • Controlling speed and direction
  • Testing and adjusting movement based on results
Bonus points

Instead of fixed timings, try using claps to control how long MiRo moves.

Extra challenge

Can you make MiRo drive into the cans all on its own using vision?!


2. Watch the edge (sonar)

Program MiRo to use its ultrasound sensor to detect the edge of the table and stop safely before it falls.

Focus on:

  • Reading continuous sensor values
  • Using comparisons to detect distance thresholds
  • Controlling movement based on sensor feedback
Bonus points

Make MiRo move forward autonomously and turn away when it detects the edge, then continue moving in a new direction.
You may need to disable the built-in cliff reflex in the Program Start block to test this properly.


3. Emergency lights

When MiRo detects a touch on its back, it should rotate in place and cycle through its LED colours in sequence.

Focus on:

  • Touch sensor input
  • Looping behaviour
  • Controlling LED outputs
  • Combining movement and light effects
Bonus points

Create a flashing pattern that resembles an emergency vehicle.


4. Friendly MiRo

When MiRo detects a pat on the head, it should perform a friendly behaviour such as wagging its tail and expressing a positive response. After 5 seconds without further interaction, it should return to its default state.

Focus on:

  • Touch-based event handling
  • Timers and delays
  • State-based behaviour
  • Coordinating multiple outputs
Bonus points

Use all available cosmetic joints to create a richer "friendly" animation.

Wrapping up

If you completed all four tasks, that's a good result. If not, that's fine — the aim here is to get familiar with the interface and basic programming concepts in MiRoCODE.

If needed, you can refer to example solutions given here.