OLED Display Functions
Last updated
Last updated
The functions below allow you to control the output display on the Zen. These are specific to the Zen and do not work in the CronusMAX Plus.
Function
Description
Zen
Plus
Draws a pixel on the OLED display
✔️
❌
Draws a line on the OLED display
✔️
❌
Draws a rectangle on the OLED display
✔️
❌
Draws a circle on the OLED display
✔️
❌
Puts a character into the string buffer for puts_oled
✔️
❌
Draws the characters supplied using putc_oled on the OLED display
✔️
❌
Sets the entire OLED display to a single color
✔️
❌
Draws a string on the OLED display
✔️
❌
Draws a pixel on the OLED display
pixel_oled( <x> , <y> , <color> );
<x> : The X coordinate of the pixel <y> : The Y coordinate of the pixel <color> : The color flag to set the pixel to 0 means Black and 1 means White
Nothing
Draws a line of pixels
line_oled( <x> , <y> , <tox> , <toy> , <thickness> , <color> );
<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
Nothing
Draws a rectangle on the OLED screen of the Cronus Zen
rect_oled( <x> , <y>, <width>, <height>, <fill>, <color> );
<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
Nothing
Draws a circle on the Cronus Zen OLED screen.
circle_oled( <x> , <y>, <radius>, <fill>, <color> );
<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
Nothing
Puts a character into the string buffer for puts_oled
putc_oled( <position> , <ascii> );
<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
Nothing
Draws the characters supplied using putc_oled on the OLED display
puts_oled( <x> , <y> , <font> , <length> , <color> );
<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 <length> <color> : The color flag to set the pixels to 0 means Black and 1 means White
Nothing
Sets the entire OLED display to a single color
cls_oled( <color> );
<color> : any defined variable.
Nothing
Draws a string on the OLED display
printf( <x> , <y> , <font> , <color> , <stringaddr> );
<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
Nothing