Dezibot 4
Loading...
Searching...
No Matches
Display.h
Go to the documentation of this file.
1
12#ifndef Display_h
13#define Display_h
14#include <stdint.h>
15#include <Arduino.h>
16#include "DisplayCMDs.h"
17
18class Display{
19 protected:
20 //how many chars are on current line
21 uint8_t charsOnCurrLine = 0;
22
23 //on which line are we currently printing
24 uint8_t currLine = 0;
25
26 //flag that marks if the y-orientation is currently flipped
27 bool orientationFlipped = false;
28
29 //flag thats marks if the color is currently inverted
30 bool colorInverted = false;
31
37 void sendDisplayCMD(uint8_t cmd);
38
44 void updateLine(uint charAmount);
45
46 public:
47
52 void begin(void);
53
58 void clear(void);
59
66 void print(char *value);
67
73 void println(char *value);
74
81 void print(String value);
82
88 void println(String value);
89
96 void print(int value);
97
103 void println(int value);
104
110 char stringToCharArray(String value);
111
112
116 void flipOrientation(void);
117
123 void invertColor(void);
124};
125
126
127#endif //Display_h
void sendDisplayCMD(uint8_t cmd)
sends the passed cmd to the display, cmd_byte is added as prefix by the function
Definition Display.cpp:37
bool colorInverted
Definition Display.h:30
void println(char *value)
same as the print method, but after the string a line break is inserted
Definition Display.cpp:152
bool orientationFlipped
Definition Display.h:27
uint8_t currLine
Definition Display.h:24
void flipOrientation(void)
flips the horizontal orientation of all content on the display
Definition Display.cpp:157
uint8_t charsOnCurrLine
Definition Display.h:21
void clear(void)
delets all content from the display, resets the linecounter, new print will start at the top left....
Definition Display.cpp:44
char stringToCharArray(String value)
string to char
Definition Display.cpp:115
void print(char *value)
prints the passed string right behind the current displaycontent the sequence "\n" can be used to mak...
Definition Display.cpp:79
void updateLine(uint charAmount)
should be called whenever characters where printed to the display. Updates the data of the class to h...
Definition Display.cpp:66
void invertColor(void)
inverts the pixelcolors, so pixels on will be set to off and currently off pixels will be turned off....
Definition Display.cpp:168
void begin(void)
initializes the display datastructures and sents the required cmds to start the display....
Definition Display.cpp:16