EvoOLED#
-
class EvoOLED#
Class to interact with the OLED display using the EvoI2CDevice library.
Initialisation & Setup
-
inline EvoOLED::EvoOLED(I2CChannel channel)#
Constructs an EvoOLED object.
- Parameters:
channel – The I2C channel to use.
-
bool EvoOLED::begin()#
Initializes the OLED display.
- Returns:
True if the display was successfully initialized, false otherwise.
-
void EvoOLED::flipDisplayOrientation(bool flip = true)#
Flips the orientation of the display.
- Parameters:
flip – true to flip, false to not flip.
-
void EvoOLED::setFontSize(uint8_t size)#
Sets the font size for the display.
- Parameters:
size – The font size to set.
Display Functions
Warning
doxygenfunction: Unable to resolve function “EvoOLED::writeToDisplay” with arguments None in doxygen xml output for project “API” from directory: ../doxygen/xml. Potential matches:
- void writeToDisplay(const char *c, int x, int y, bool clear = false, bool draw = false)
- void writeToDisplay(double f, int x, int y, bool clear = false, bool draw = false)
- void writeToDisplay(int value, int x, int y, bool clear = false, bool draw = false)
Warning
doxygenfunction: Unable to resolve function “EvoOLED::writeLineToDisplay” with arguments None in doxygen xml output for project “API” from directory: ../doxygen/xml. Potential matches:
- void writeLineToDisplay(const char *c, int line, bool clear = false, bool draw = false)
- void writeLineToDisplay(double f, int line, bool clear = false, bool draw = false)
- void writeLineToDisplay(int value, int line, bool clear = false, bool draw = false)
-
void EvoOLED::drawPixel(int x, int y, bool clear = false, bool draw = false)#
Draws a pixel on the display at the specified coordinates.
- Parameters:
x – X-coordinate of the pixel (0-127).
y – Y-coordinate of the pixel (0-63).
clear – Whether to clear the pixel (true) or draw it (false).
draw – Whether to immediately draw the screen after setting the pixel.
-
void EvoOLED::drawLine(int x0, int y0, int x1, int y1, bool clear = false, bool draw = false)#
Draws a line between two points on the display.
- Parameters:
x0 – X-coordinate of the start point (0-127).
y0 – Y-coordinate of the start point (0-63).
x1 – X-coordinate of the end point (0-127).
y1 – Y-coordinate of the end point (0-63).
clear – Whether to clear the line (true) or draw it (false).
draw – Whether to immediately draw the screen after setting the line.
-
void EvoOLED::drawRect(int x, int y, int w, int h, bool fill = false, bool clear = false, bool draw = false)#
Draws a rectangle on the display.
- Parameters:
x – X-coordinate of the top-left corner (0-127).
y – Y-coordinate of the top-left corner (0-63).
w – Width of the rectangle (1-128).
h – Height of the rectangle (1-64).
fill – Whether to fill the rectangle (true) or draw only the outline (false).
clear – Whether to clear the rectangle (true) or draw it (false).
draw – Whether to immediately draw the screen after setting the rectangle.
-
void EvoOLED::drawCircle(int x, int y, int r, bool fill = false, bool clear = false, bool draw = false)#
Draws a circle on the display.
- Parameters:
x – X-coordinate of the center of the circle (0-127).
y – Y-coordinate of the center of the circle (0-63).
r – Radius of the circle (1-64).
fill – Whether to fill the circle (true) or draw only the outline (false).
clear – Whether to clear the circle (true) or draw it (false).
draw – Whether to immediately draw the screen after setting the circle.
-
void EvoOLED::drawTriangle(int x0, int y0, int x1, int y1, int x2, int y2, bool clear = false, bool draw = false)#
Draws a triangle on the display.
- Parameters:
x0 – X-coordinate of the first vertex (0-127).
y0 – Y-coordinate of the first vertex (0-63).
x1 – X-coordinate of the second vertex (0-127).
y1 – Y-coordinate of the second vertex (0-63).
x2 – X-coordinate of the third vertex (0-127).
y2 – Y-coordinate of the third vertex (0-63).
clear – Whether to clear the triangle (true) or draw it (false).
draw – Whether to immediately draw the screen after setting the triangle.