For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom OLED Buttons

With the following example from TaylorDrift21 you are able to make and display custom buttons to be displayed on the OLED with your GPC script.

Code-Snippet

int update = TRUE;

init {
    cls_oled(0);
}

main {

    if(update){
        cls_oled(0);
        rect_oled(0,0, OLED_WIDTH, OLED_HEIGHT, OLED_BLACK, OLED_WHITE);
        printButton(30,20,ASCII_UPPER_A) ;
        printButton(50,20,ASCII_UPPER_Y) ;
        printButton(70,20,ASCII_UPPER_X) ;
        printButton(90,20,ASCII_UPPER_B) ;
        update = FALSE;
    }
}

function printButton(fHorizontal,fVertical,fButton){
    circle_oled(fHorizontal + 3,fVertical + 4,7,1,1);
    putc_oled(1,fButton);
    puts_oled(fHorizontal,fVertical,0,1,0);
}

Last updated