Controlling the display

Copyright © 2017–2023 J. M. Spivey
Revision as of 11:47, 11 March 2022 by Mike (talk | contribs)
Jump to navigation Jump to search

One of the attractions of the micro:bit for exploring low-level programming is that it has the 25-LED display, but that controlling this display is not quite trivial, giving a series of non-trivial but nevertheless manageable challenges. Our early attempts to program the display will depend on controlling the hardware directly, and will need different code on the V1 and V2 {microbit}}s, whose displays are wired differently. However, once we start to use the display as a tool for investigating other aspects of the hardware (for example, when we use it to implement a 2-D spirit level based on the accelerometer), it's good if client code can be written in a way that is the same for V1 and V2. The micro:bian operating system provides a server process – implemented differently on V1 and V2 – that provides just this abstraction.

Static images

Computing images dynamically

The micro:bian display server