Problem statement

Display any given image on the micro:bit display. The image will be a 5x5 array, where 0 will represent off and 1 will represent on.

The following, for example, should display a heart:


# #![allow(unused_variables)]
#fn main() {
let heart = [
    [0, 1, 0, 1, 0],
    [1, 0, 1, 0, 1],
    [1, 0, 0, 0, 1],
    [0, 1, 0, 1, 0],
    [0, 0, 1, 0, 0],
];
#}

At this point, you may know enough to solve the problem yourself. If you want to jump straight to the solution, you can go to the end of the next section in this chapter.

This section will continue formally breaking this problem down into smaller and more tractable pieces.