Inkplate 6FLICK program button (GPIO_NUM_36) and touchscreen conflict

Customer:

On the left side of the 6FLICK a push button is installed. Is this button programmatically accessible? We want to toggle the backlight using this hardware button if possible.

Originally submitted via email support on 16 March 2025. Migrated to the forum for community visibility.

Soldered Support:

It’s the WAKE button: Inkplate-Arduino-library/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Wake_Up_Button/Inkplate6FLICK_Wake_Up_Button.ino at 2dd263f2f9548aadac8638413a143beddf068a64 · SolderedElectronics/Inkplate-Arduino-library · GitHub

Pin is GPIO_NUM_36, you can use pinMode as with any Arduino button.

Customer:

I don’t want to use it for the deep sleep / wakeup, so how should I use it inside my program? During loop() or in the setup()?

Attachment omitted in migration: ~WRD0000.jpg

Soldered Support:

You can use it in your program with digitalRead, just use pin GPIO_NUM_36, check out this code example:

#define BUTTON_PIN 36 // GPIO_NUM_36

void setup() {
  Serial.begin(115200);

  // GPIO 36 is input-only; no internal pull-ups available
  pinMode(BUTTON_PIN, INPUT); // You must use external pull-up resistor
}

void loop() {
  int buttonState = digitalRead(BUTTON_PIN);

  if (buttonState == LOW) {
    Serial.println("Button is PRESSED");
  }

  delay(200); // debounce / print rate
}

No need to use INPUT_PULLUP as the pin is input only, there is also a hardware pullup.

Customer:

There’s an issue with the code: if I touch the screen the pinstate goes to 0. So I don’t use the button, just touching the screen makes it go low. Unusable in my case.

Also, we have multiple cases of a broken power / wake button; the little pin came off. Is this a known issue and is this button replaceable easily? It’s too little to see how it mounts to the part on the PCB.

Attachment omitted in migration: image001.jpg

Soldered Support:

After investigating the schematic, GPIO_36 is also used for the touchscreen.

For the button read code, you can also check if ts_available returns true - this means it’s the touchscreen. If it returns false, this means the button was pressed.

If this doesn’t work as expected, you can check the last pressed coordinates. If they changed, it’s the touchscreen; if they didn’t change, it’s the button press.

As for the buttons themselves, you can find the button by part number: K2-1114SA-A4SW-06

You can also use other types of press-buttons. On the hardware, the pins which get shorted upon press are the following: the ones close together are the opposite sides of the button.

Attachment omitted in migration: image.png

Attachment omitted in migration: image.png