modelDisplay8x32

Large educational 8x32 text screen: each message received from machine.Display(0) is written under the last line, the screen scrolls once full

Extends from Internal.Icons.TextIcon8x32 (Icon of a 8x32 text screen (generated by make_text_icons.py): shows textCode of Internal.Devices.PartialTextDisplay, which it extends).

Information

Large version of Peripherals.Display: 8 lines of 32 characters. To be connected like it, with connect(mcu.Display0, display.displayLink) (causal logical link, not electrical); several displays may share the same Display0.

Each machine.Display(0).write(text) of the script is written on the first free line, under the last written one; once the 8 lines are written, the text scrolls up by one line and the new message takes the bottom line, like a terminal. A message longer than 32 characters is truncated on the icon; the full text remains in the simulation log (parameter logReceived). The screen starts empty. Details: Internal.Icons.TextIcon8x32 (generated icon), which extends Internal.Devices.PartialTextDisplay (behaviour).

Example: Examples.Display.Large.

Parameters

TypeNameDefaultDescription
IntegernLines (from PartialTextDisplay)Number of lines of the screen - fixed by the extending display, consistent with its generated icon
BooleanlogReceived (from PartialTextDisplay)trueAlso write each received message in the simulation log (turn off when several displays share the same link, to avoid duplicate lines)
IntegernCols (from PartialTextDisplay)Interfaces.TEXT_DISPLAY_COLSNumber of columns

Connectors

TypeNameDefaultDescription

Components

TypeNameDefaultDescription
Integer[nLines*nCols]textCode (from PartialTextDisplay)ASCII codes shown on the icon, line after line: line i, column j at index (i - 1)*nCols + j
Integerfilled (from PartialTextDisplay)Number of lines written so far (at most nLines)