---
title: Custom OLED Buttons
slug: gpc/custom-oled-buttons
description: Learn how to create and showcase custom buttons on an OLED screen using a GPC script. This step-by-step guide includes code to initialize and update the OLED display with buttons, along with a function to print the buttons on the screen. Explore how ASCII
docTags: 
createdAt: 2022-08-25T21:27:55.000Z
---

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.

:::CodeblockTabs
GPC

```javascript
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);
}
```
:::

