Dezibot 4
Loading...
Searching...
No Matches
Display Class Reference

#include <Display.h>

Public Member Functions

void begin (void)
 initializes the display datastructures and sents the required cmds to start the display. Should only be called once.
 
void clear (void)
 delets all content from the display, resets the linecounter, new print will start at the top left. Orientationflip is not resetted
 
void print (char *value)
 prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display
 
void println (char *value)
 same as the print method, but after the string a line break is inserted
 
void print (String value)
 prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display
 
void println (String value)
 same as the print method, but after the string a line break is inserted
 
void print (int value)
 prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display
 
void println (int value)
 same as the print method, but after the string a line break is inserted
 
char stringToCharArray (String value)
 string to char
 
void flipOrientation (void)
 flips the horizontal orientation of all content on the display
 
void invertColor (void)
 inverts the pixelcolors, so pixels on will be set to off and currently off pixels will be turned off. affects already printed content as well as future prints.
 

Protected Member Functions

void sendDisplayCMD (uint8_t cmd)
 sends the passed cmd to the display, cmd_byte is added as prefix by the function
 
void updateLine (uint charAmount)
 should be called whenever characters where printed to the display. Updates the data of the class to handle linebreaks correctly
 

Protected Attributes

uint8_t charsOnCurrLine = 0
 
uint8_t currLine = 0
 
bool orientationFlipped = false
 
bool colorInverted = false
 

Detailed Description

Definition at line 18 of file Display.h.

Member Function Documentation

◆ begin()

void Display::begin ( void )

initializes the display datastructures and sents the required cmds to start the display. Should only be called once.

Warning
doesn't initalize the I²C bus itself, therefore wire.begin(1,2) must be called elsewhere, before this method.

Definition at line 16 of file Display.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

void Display::clear ( void )

delets all content from the display, resets the linecounter, new print will start at the top left. Orientationflip is not resetted

Definition at line 44 of file Display.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flipOrientation()

void Display::flipOrientation ( void )

flips the horizontal orientation of all content on the display

Definition at line 157 of file Display.cpp.

+ Here is the call graph for this function:

◆ invertColor()

void Display::invertColor ( void )

inverts the pixelcolors, so pixels on will be set to off and currently off pixels will be turned off. affects already printed content as well as future prints.

Definition at line 168 of file Display.cpp.

+ Here is the call graph for this function:

◆ print() [1/3]

void Display::print ( char * value)

prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display

Parameters
valuethe string "xyz" that should be printed to the display

Definition at line 79 of file Display.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print() [2/3]

void Display::print ( int value)

prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display

Parameters
valuethe string "xyz" that should be printed to the display

Definition at line 140 of file Display.cpp.

+ Here is the call graph for this function:

◆ print() [3/3]

void Display::print ( String value)

prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display

Parameters
valuethe string "xyz" that should be printed to the display

Definition at line 124 of file Display.cpp.

+ Here is the call graph for this function:

◆ println() [1/3]

void Display::println ( char * value)

same as the print method, but after the string a line break is inserted

Parameters
valuethe string that should be printed

Definition at line 152 of file Display.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ println() [2/3]

void Display::println ( int value)

same as the print method, but after the string a line break is inserted

Parameters
valuethe string that should be printed

Definition at line 146 of file Display.cpp.

+ Here is the call graph for this function:

◆ println() [3/3]

void Display::println ( String value)

same as the print method, but after the string a line break is inserted

Parameters
valuethe string that should be printed

Definition at line 132 of file Display.cpp.

+ Here is the call graph for this function:

◆ sendDisplayCMD()

void Display::sendDisplayCMD ( uint8_t cmd)
protected

sends the passed cmd to the display, cmd_byte is added as prefix by the function

Parameters
cmdthe byte instruction that shold by sent

Definition at line 37 of file Display.cpp.

+ Here is the caller graph for this function:

◆ stringToCharArray()

char Display::stringToCharArray ( String value)

string to char

Parameters
valuethe string that should be converted to char

Definition at line 115 of file Display.cpp.

◆ updateLine()

void Display::updateLine ( uint charAmount)
protected

should be called whenever characters where printed to the display. Updates the data of the class to handle linebreaks correctly

Parameters
charAmountHow many characters where added to the screen

Definition at line 66 of file Display.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ charsOnCurrLine

uint8_t Display::charsOnCurrLine = 0
protected

Definition at line 21 of file Display.h.

◆ colorInverted

bool Display::colorInverted = false
protected

Definition at line 30 of file Display.h.

◆ currLine

uint8_t Display::currLine = 0
protected

Definition at line 24 of file Display.h.

◆ orientationFlipped

bool Display::orientationFlipped = false
protected

Definition at line 27 of file Display.h.


The documentation for this class was generated from the following files: