Skip to content

Create a new program

Start afresh

Open the samples menu and select the empty program, as shown below.

Select samples tile

microcode

Select empty tile

microcode

Press d-A to create your first rule

The editor should be open on the empty program with the cursor in the When section of the first rule. Press d-A to bring up the When menu, which lists the various events to choose from. The press event tile is selected. Press d-A to insert the press tile into the rule.

The empty program

microcode

The When menu

microcode

Select the button to recognize

As shown below, the cursor should now be on the empty tile to the right of the press tile.

Press the d-A button again to bring up the menu that lists the options for which “pressable” items the micro:bit offers, which includes the m-A and m-B buttons, as well as the micro:bit logo and the three large pins (labelled 0, 1, and 2) on the micro:bit’s edge connector.

Press d-A to select the m-A button.

First tile created!

microcode

Pressable options

microcode

When complete, move to Do!

Now that you have finished the When section of the rule, the cursor now is in the Do section, as shown below. Click the d-A button to bring up the menu of actions to select from. The show image tile is selected by default. Press d-A again to insert the tile.

When section complete

microcode

Do menu

microcode

Start your first image

Now, press d-A again to bring up a two-tile menu with the image editor tile selected (the other tile is the repeat tile). Press d-A to enter the image editor.

Show image inserted

microcode

Choose image editor

microcode

Edit the image

Use the direction pad to move around the 5x5 LED matrix; press d-A to toggle the state of the LED the cursor is on. When you are finished designing your image press d-B to exit the image editor.

You have finished your first MicroCode When-Do rule!

LED image editor

microcode

First rule completed!

microcode

Run your program

You can run the program in one of three ways:

  • use the direction pad to navigate to the green play tile and press d-A
  • press either the m-A or m-B button on the micro:bit
  • press the menu button on the display shield

The micro:bit will indicate the program is running by a quick circular animation on the LED display.