Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Display Class Reference
Use Microbit 5x5 led display in various output communications. More...
#include <Display.h>
Public Member Functions | |
| Display (MicroBitDisplay &uDpl) | |
| Display hold a refference to a MicroBitDisplay object. | |
| void | clear () |
| Clears the display and its buffer. | |
| void | setStick (uint8_t size) |
| The stick's length is represented by the count of digits being 1. | |
| void | setFlag (uint8_t position) |
| Set a single dot. | |
| void | toRow (uint8_t rowNr, uint8_t rowContent) |
| Puts a bitpattern in a row. | |
| void | toRows (uint32_t allBits) |
| 25 bits showed in the display as a whole. | |
| void | vertDecimal (uint8_t r0, uint8_t r1, uint8_t r2, uint8_t r3, uint8_t r4) |
| Vertdecimal shows a single number in [00000,99999]. | |
| void | vertDecimal (uint8_t r0, uint8_t r1, uint8_t r2, uint8_t r3, uint8_t r4, bool leftDotOn) |
| Vertdecimal shows a single number in [00000,99999]. | |
| void | vertClock (uint16_t minuts) |
| Binary Clock with hours and minuts. | |
| void | vertSecClock (uint32_t minuts) |
| Binary Clock with hours, minuts an seconds. | |
Detailed Description
Use Microbit 5x5 led display in various output communications.
It deals with display in DISPLAY_MODE_BLACK_AND_WHITE mode
Definition at line 32 of file Display.h.
Constructor & Destructor Documentation
| Display | ( | MicroBitDisplay & | uDpl ) |
Display hold a refference to a MicroBitDisplay object.
When constructed from MicroBit's MicroBitDisplay of a not yet initialized
MicroBit object - that must be done before using the Display instance.
- Parameters:
-
uDpl reference to a MicroBitDisplay object.
Definition at line 4 of file Display.cpp.
Member Function Documentation
| void clear | ( | ) |
Clears the display and its buffer.
Definition at line 8 of file Display.cpp.
| void setFlag | ( | uint8_t | position ) |
Set a single dot.
- Parameters:
-
position in [0,24] for showing that single dot.
Definition at line 18 of file Display.cpp.
| void setStick | ( | uint8_t | size ) |
The stick's length is represented by the count of digits being 1.
- Parameters:
-
size in range [0,24]
Definition at line 13 of file Display.cpp.
| void toRow | ( | uint8_t | rowNr, |
| uint8_t | rowContent | ||
| ) |
Puts a bitpattern in a row.
- Parameters:
-
rowNr in [0,4] for selected row rowContent in [0,31] to be shown binary
Definition at line 23 of file Display.cpp.
| void toRows | ( | uint32_t | allBits ) |
25 bits showed in the display as a whole.
- Parameters:
-
bits25 contains the 25 bit to be showed
Definition at line 29 of file Display.cpp.
| void vertClock | ( | uint16_t | minuts ) |
Binary Clock with hours and minuts.
hours in top rows (4 for multiplum of 10, 3 for remainer)
minuts in bottom rows (1 for multiplum of 10, 0 for remainer)
- Parameters:
-
minuts of the day
Definition at line 44 of file Display.cpp.
| void vertDecimal | ( | uint8_t | r0, |
| uint8_t | r1, | ||
| uint8_t | r2, | ||
| uint8_t | r3, | ||
| uint8_t | r4, | ||
| bool | leftDotOn | ||
| ) |
Vertdecimal shows a single number in [00000,99999].
The parameters goes from top to bottom, whereas a obvious
perception is reading the disply number from top bottom.
It os possible to turn on left column on the display
- Parameters:
-
r0 bottom row - row 0 r1 row 1 r2 row 2 r3 row 3 r4 top row - row 4 leftDotOn turns left dot on. leftdot is not used to represent a digit in base 10 numbers.
Definition at line 38 of file Display.cpp.
| void vertDecimal | ( | uint8_t | r0, |
| uint8_t | r1, | ||
| uint8_t | r2, | ||
| uint8_t | r3, | ||
| uint8_t | r4 | ||
| ) |
Vertdecimal shows a single number in [00000,99999].
The parameters goes from top to bottom, whereas a obvious
perception is reading the disply number from top bottom.
Nothing restrict the rows to hold values less teen
but if some are greather than 31 the value or proberbly
bitwise ored og cleared by other numbers
- Parameters:
-
r0 bottom row - row 0 r1 row 1 r2 row 2 r3 row 3 r4 top row - row 4
Definition at line 34 of file Display.cpp.
| void vertSecClock | ( | uint32_t | minuts ) |
Binary Clock with hours, minuts an seconds.
hours in row 4 (top row)
minuts in rows 3 and 2 (3 for multiplum of 10, 2 for remainer)
seconds in rows 1 and 0 (1 for multiplum of 10, 0 for remainer)
- Parameters:
-
second of the day
Definition at line 52 of file Display.cpp.
Generated on Mon Jul 18 2022 21:57:34 by
1.7.2