| This article has links to websites or programs outside of Scratch and Wikipedia. Remember to stay safe while using the internet as we cannot guarantee the safety of other websites. |
- This article is about the block with a string input. For the block with a special input, see Display () (micro:bit block). For the Raspberry Pi block, see Display Text () (Raspberry Pi Sense HAT block).
| display text () | |
display text [Hello!]:: microbit | |
| Category | micro:bit |
| Type | Stack |
| Introduced in | 3.0 |
The display text () block is a stack block and a micro:bit block. It is used for displaying a line of text on the 5x5 LED matrix.
When one letter is given, the letter will be statically shown and not disappear after the block has finished running.
When given text of many letters, the text will be scrolled across the display, one letter at a time. It will start and end with an empty display. It has a character limit of 19.[1][2]
A limited set of characters are supported, comprising of English lowercase and uppercase letters, numbers, and some symbols. Those that are unsupported will be shown empty.
Example Uses
- Responding to button presses
when (A v) button pressed display text [A] when (B v) button pressed display text [B]
- Instructing the user
when gf clicked display text [press A to play] wait until <(A v) button pressed?> ...
References
- ↑ scratch-vm/src/extensions/scratch3_microbit/index.js Note the limit is 19 characters
- ↑ https://medium.com/scratch-mathland/saving-micro-bit-sensor-data-2506cc3f36f9