OLED Display Functions
The functions below allow you to control the output display on the Zen. These are specific only to the Cronus Zen.
Function | Description |
---|---|
pixel_oled | Draws a pixel on the OLED display. |
line_oled | Draws a line on the OLED display. |
rect_oled | Draws a rectangle on the OLED display. |
circle_oled | Draws a circle on the OLED display. |
putc_oled | Puts a character into the string buffer for puts_oled. |
puts_oled | Draws the characters supplied using putc_oled on the OLED display. |
cls_oled | Sets the entire OLED display to a single color. |
Draws a string on the OLED display. |
pixel_oled draws a pixel on the OLED display
🔴 Syntax
pixel_oled( , , );
⚪ Parameters
: The X coordinate of the pixel : The Y coordinate of the pixel : The color flag to set the pixel to 0 means Black and 1 means White
🔵 Returns
Nothing
line_oled draws a line of pixels
🔴 Syntax
line_oled( <x> , <y> , <tox> , <toy> , <thickness> , <color> );
⚪ Parameters
<x> : The starting X coordinate <y> : The starting Y coordinate <tox> : The ending X coordinate <toy> : The ending Y coordinate <thickness>: The thickness of the line <color>: The color flag to set the pixels to 0 means Black and 1 means White
🔵 Returns
Nothing
rect_oled draws a rectangle on the OLED screen of the Cronus Zen
🔴 Syntax
rect_oled( <x> , <y>, <width>, <height>, <fill>, <color> );
⚪ Parameters
<x> : The X coordinate of the upper left corner of the rectangle <y> : The Y coordinate of the upper left corner of the rectangle <width> : The width of the rectangle to draw <height> : The height of the rectangle to draw <fill> : A flag saying if the rectangle should be filled or just outlined (1 means fill it, 0 means only draw the outline) <color> : The color flag to set the pixels to 0 means Black and 1 means White
🔵 Returns
Nothing
circle_oled draws a circle on the Cronus Zen OLED screen.
🔴 Syntax
circle_oled( <x> , <y>, <radius>, <fill>, <color> );
⚪ Parameters
<x> : The X coordinate of the center of the circle? <y> : The Y coordinate of the center of the circle? <radius> : The radius of the circle to draw (the distance from the center point to the outer edge) <fill> : A flag saying if the rectangle should be filled or just outlined (1 means fill it, 0 means only draw the outline) <color> : The color flag to set the pixels to 0 means Black and 1 means White
🔵 Returns
Nothing
putc_oled puts a character into the string buffer for puts_oled
🔴 Syntax
putc_oled( <position> , <ascii> );
⚪ Parameters
<position> : The 1 based index where to put the character in the buffer <ascii> : The ASCII code value to put into the buffer, see table of supported characters/constants here
🔵 Returns
Nothing
puts_oled draws the characters supplied using putc_oled on the OLED display
🔴 Syntax
puts_oled( <x> , <y> , <font> , <length> , <color> );
⚪ Parameters
<x> : The X coordinate of the upper left corner of where the text will be drawn <y> : The Y coordinate of the upper left corner of where the text will be drawn <font> : The font constant to use when drawing the text see table of supported fonts <length> <color> : The color flag to set the pixels to 0 means Black and 1 means White
🔵 Returns
Nothing
cls_oled sets the entire OLED display to a single color
🔴 Syntax
cls_oled( <color> );
⚪ Parameters
<color> : any defined variable.
🔵 Returns
Nothing
print draws a string on the OLED display
🔴 Syntax
print( <x> , <y> , <font> , <color> , <stringaddr> );
⚪ Parameters
<x> : The X coordinate of the upper left corner of where the text will be drawn <y> : The Y coordinate of the upper left corner of where the text will be drawn <font> : The font constant to use when drawing the text see table of supported fonts here <color> : The color flag to set the pixels to 0 means Black and 1 means White <stringaddr> : The offset in the data section where the 0 terminated string is located, usually used with the string constant type
🔵 Returns
Nothing