LED-Bildschirm

Der BBC micro:bit LED-Bildschirm besteht aus 25 roten LED-Leuchten, die in einem 5x5 Raster angeordnet sind (5 LEDs quer und 5 LEDs nach unten).

Welche LED?

You use `x , y` coordinates to specify a particular LED in the grid; where `x` is the horizontal position and `y` is the vertical position (0, 1, 2, 3, 4). To figure out the `x`, `y` coordinates, position your micro:bit horizontally, like a credit card (see picture above).

Hier sind die x-, y-Koordinaten für die LEDs im 5X5-Raster:

`0, 0` `1, 0` `2, 0` `3, 0` `4, 0`

`0, 1` `1, 1` `2, 1` `3, 1` `4, 1`

`0, 2` `1, 2` `2, 2` `3, 2` `4, 2`

`0, 3` `1, 3` `2, 3` `3, 3` `4, 3`

`0, 4` `1, 4` `2, 4` `3, 4` `4, 4`

The x, y coordinates for the LED in the centre of the grid are `2, 2`. Starting from `0, 0` count over 2 columns and then down 2 rows.

Zeile, Spalte - 1

Since the row and column numbers start at 0, an easy way to figure out the x, y coordinates is to subtract 1 from the row and column number (when counting from 1). In other words, to specify the LED in the 4th column 5th row, subtract 1 from each number to get coordinates `3, 4`.

LEDs programmieren

MakeCode Editor

Schaltet eine LED ein/aus

Use plot and unplot to turn an LED on or off.

Ist eine LED ein-/ausgeschaltet?

Use the point function to find out if a LED is on or off.

Display images, strings and numbers

Instead of turning individual LEDs on or off, as above, you can display an image directly to the screen or show text/numbers on screen using the show number/show string function.

Python

See the images section of the documentation to learn more about programming the LEDs in Python for micro:bit.