MICROBIT PROJECT
LED PLOT & UNPLOT

separator-blank.png

DESCRIPTION

Students will learn how to turn on (plot) and turn off (unplot) specific LEDs on the LED Matrix.

STEPS

STEP 1
Go to
https://makecode.microbit.org/ and create a new project named PlotUnplot.

STEP 2
In the forever block, drag in a plot x y block (LED menu).  Set x and y to 0 0.  This will turn on the LED at (0, 0).

Note: The LED at (0, 0) is at the very top left.  The LED at (1, 0) is next to the right.  The LED at the right bottom is at (4, 4).

STEP 3
Drag in a pause block (Basic menu).  Make the pause last 1 second.

STEP 4
Drag in an unplot x y block (LED).  Set x and y to 0 0.  This will turn off the LED at (0, 0).

STEP 5
Drag in a pause block (Basic menu).  Make the pause last 1 second.



STEP 6 (TEST)
Download and run your program.  The top left pixel should toggle on and off. 

EXTRA

1. The program could also be created using the toggle x y block.  Try it out if you have time.

2. Create a program that will make a horizontal line gradually appear from left to right one pixel at a time.

separator-blank.png