Ada_Drivers_Library/examples/MicroBit/text_scrolling
Fabien Chouteau 456c3231ac Use startup-gen on MicroBit board support 2019-08-22 19:53:17 +02:00
..
src MicroBit: Split the original example in two 2018-07-13 19:44:34 +02:00
README.md MicroBit: Split the original example in two 2018-07-13 19:44:34 +02:00
text_scrolling.gpr Use startup-gen on MicroBit board support 2019-08-22 19:53:17 +02:00

README.md

Text Scrolling Example

In this example we will see how to display text on the LED matrix of the micro:bit.

Code

To display text on the LED matrix, we will use the procedure Display of the MicroBit.Display package.

   procedure Display (Str : String)
     with Pre => Str'Length <= Scroll_Text_Max_Length;

Arguments:

  • Str : The text to be displayed on the LED matrix

Precondition:

The procedure Display has a precondition that the length of the text cannot be more than Scroll_Text_Max_Length (128 characters).

Here is the code:

with MicroBit.Display;

procedure Main is
begin

   loop
      MicroBit.Display.Display ("Make with Ada!  ");
   end loop;
end Main;