Output 5x5 LED image on board
Simulink Coder Support Package for BBC micro:bit/ LED
The 5x5 LED Matrix block outputs a 5x5 LED image
on a built-in 5x5 LED matrix on the board. The block has one input
port, Matrix. The Matrix port accepts a 5x5 matrix with all the elements
The BBC micro:bit uses x, y coordinates to identify a particular
LED in the 5x5 matrix. The coordinates start from
the top-left corner of the matrix.
Place the board horizontally on a table with the LEDs facing upwards. The horizontal line represents the x-coordinates and the vertical line represent the y-coordinates.
Suppose that you are sending a matrix with values
0 0 0 1;0 1 0 1 0;0 0 1 0 0;0 1 0 1 0;1 0 0 0 1] as an input
to the block. All the LEDs corresponding to elements with value
Matrix— Input signal
The port accepts a 5x5 matrix with all the elements as either
When the element value is greater than 0, the corresponding LED turns
on. Otherwise, it turns off.