OLED display built-ins
The Zen OLED is 128 × 64 monochrome pixels. Valid coordinates are X 0..127 and Y 0..63.
cls_oled
Fills the complete display with one color.
Syntax
cls_oled(color);Parameters
color:OLED_BLACK(0) orOLED_WHITE(1).
Returns
Nothing.
Example
init {
cls_oled(OLED_BLACK);
}pixel_oled
Sets one pixel.
Syntax
Parameters
x:0..127.y:0..63.color:OLED_BLACKorOLED_WHITE.
Returns
Nothing.
Example
line_oled
Draws a line between two points.
Syntax
Parameters
x,to_x:0..127.y,to_y:0..63.thickness:1..127.color:OLED_BLACKorOLED_WHITE.
Returns
Nothing.
Example
rect_oled
Draws a rectangle outline or a filled rectangle.
Syntax
Parameters
x:0..127.y:0..63.width:1..128.height:1..64.fill:TRUEfor filled orFALSEfor outline.color:OLED_BLACKorOLED_WHITE.
Returns
Nothing.
Example
Keep the full rectangle within the display: x + width <= 128 and y + height <= 64.
circle_oled
Draws a circle outline or a filled circle.
Syntax
Parameters
x: center X,0..127.y: center Y,0..63.radius:1..63.fill:TRUEorFALSE.color:OLED_BLACKorOLED_WHITE.
Returns
Nothing.
Example
Choose a center and radius that do not push the intended drawing outside the screen.
putc_oled
Writes one ASCII or glyph byte into the OLED text buffer. It does not draw until puts_oled is called.
Syntax
Parameters
position: buffer position1..18on the current 32-bit target.ascii_code: supported byte32..136.
Returns
Nothing.
Example
puts_oled
Draws buffered characters using a built-in OLED font.
Syntax
Parameters
x:0..127.y:0..63.font:OLED_FONT_SMALL,OLED_FONT_MEDIUM, orOLED_FONT_LARGE.length:1..18on the current 32-bit target.color:OLED_BLACKorOLED_WHITE.
Returns
Nothing.
Example
The large font cannot render every special glyph. Compile and device-test the selected byte and font combination.
image_oled
Draws a packed monochrome const image record.
Syntax
Parameters
x:0..127.y:0..63.color:OLED_BLACKorOLED_WHITE.clear_background:TRUEto clear the image rectangle before drawing.image_address:addr(ImageName)or a valid image-row address.
Returns
Nothing.
Example
The data begins with width and height, followed by exactly ceil(width * height / 8) packed pixel bytes.
print
Draws a const string using a built-in font. print is the current 32-bit name; printf is retained only as a deprecated compatibility alias.
Syntax
Parameters
x:0..127.y:0..63.font:OLED_FONT_SMALL,OLED_FONT_MEDIUM, orOLED_FONT_LARGE.color:OLED_BLACKorOLED_WHITE.string_address:addr(StringName)or a valid string-row address.
Returns
Nothing.
Example
Use a declared const string; a bare string literal is not a runtime address argument.
Custom button badge
This builds a reusable visual button from a circle and one buffered character. Keep drawing separate from menu state mutation so viewing a page cannot accidentally change or save settings.
Last updated

