Benny Andersen / microbitOLED

Dependencies:   microbit

Embed: (wiki syntax)

« Back to documentation index

Display Class Reference

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:
uDplreference 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:
positionin [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:
sizein 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:
rowNrin [0,4] for selected row
rowContentin [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:
bits25contains 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:
minutsof 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:
r0bottom row - row 0
r1row 1
r2row 2
r3row 3
r4top row - row 4
leftDotOnturns 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:
r0bottom row - row 0
r1row 1
r2row 2
r3row 3
r4top 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:
secondof the day

Definition at line 52 of file Display.cpp.