CLIQ Makecode Extension

The CLIQ Robot has its own Makecode extension – an extra drawer that can be imported into Makecode to add robot-specific features.

Note: Before you use this library, it’s important to assemble your robot and get it working with the example program.

CLIQ Extension URL

Version 1.02:

How to Add the CLIQ Extension

  1. Open Makecode, and either start a new project or open an existing one.
  2. On the side bar, click on Advanced to expand the list of drawers, then click on Extensions.
  3. Copy the URL from the section above and paste it into the text box.

  4. Success! You should now have a CLIQ drawer in your project.
    Open it to see special blocks designed for the robot.

CLIQ Blocks Reference

This section explains each of the blocks in the CLIQ drawer.


Type: statement

Light up the CLIQ robot’s mouth with a given colour.
Every LED (tooth?) will be set to the same colour.

This command is very useful to when testing the robot program.
What state is it in? Maybe green means “explore”, red means “bumped the left side”, etc.

Smile 5

Type: statement

Light up the CLIQ robot’s mouth with five chosen colours.
Every LED (tooth?) will be set to the corresponding colour.
Similar to the previous command, but gives you more control over colours.

Count Down

Type: statement

Count down and delay by some number of seconds, using the LEDs (teeth?) to indicate how many seconds remain.

This will be very useful for the SUMO program.


Type: statement

Stop both of the wheel motors, and bring CLIQ to a halt.

Might be needed when the CLIQ robot has reached its goal.
Works well with a victory song?

Set Motor Speed

Type: statement

Manually set the speed of both motors, -100 to 100

  • 0 is stationary,
  • 100 is maximum forward speed,
  • -100 is maximum reverse speed.

For example, 10 is a slow forward speed.

The CLIQ robot has “tank style” steering.
eg: If both motors turn forwards, the robot drives forwards.

eg: If the left motor turns forwards and the right motor turns backwards, the robot rotates clockwise (turns right)

Move _ at Speed

Type: statement

Set the robot move in that direction, with the given speed, 0 to 100.
The drop-down lets you choose which direction that is.

See also the Set Motor Speed block above.

On Over The Edge

Type: container

Run some code when the robot goes over the edge.
(That is, when the floor sensor detects a dropoff or dark line)

The drop-down lets you also set some code to run when the robot goes away from the edge.

Only runs the code once per occasion, not continuously until no longer over the edge. (For that see is over edge)

Is Over Edge

Type: boolean

Check if the robot is over the edge right now. (true if over the edge, false if not)
Your code might check this inside a loop, and keep doing something until the value changes.

Set Over Edge Threshold

Type: statement

What is an edge or a dropoff, exactly?
You might find that on your table at home, the robot keeps thinking it’s hit an edge.
This threshold is usually set to 1000, but you can increase it (up to 1022) if it needs to be less sensitive.

On Bumped

Type: statement

Run some code once when the CLIQ robot runs into something.
Use the dropdown to choose:

  • Hit the left bumper
  • Hit the right bumper
  • Hit both bumpers at once
  • Hit neither bumper – now cleared and able to move ahead

Very useful in any robot program that has to avoid obstacles!

Is Bumped

Type: boolean

Check if the robot is bumping into something right now. (true if bumped that way, false if not)

Your code might need to check this within a loop or branch, and choose what to do from the answer.


Type: Expression          

Indicates the current version of the CLIQ extension.

We might publish improvements and new versions of the CLIQ extension.
This block helps you know whether to install a new version.


So import the CLIQ extension into your project, and give it a try!

Some features – like the speakers, or infrared communication between robots – are not in the CLIQ extension.
That’s because they’re already in MakeCode! You’ll find them in the other drawers.