Inkplate GPIO code for external buttons via MCP23017

Customer:

I need code to get the GPIO working. I want to connect external buttons to Inkplate and recess the displays into the wall so the touch buttons won’t be accessible.

Originally submitted via the contact form on soldered.com on 6 May 2022. Migrated to the forum for community visibility.

Soldered Support:

There is an example for the MCP23017 GPIO expander in the Inkplate library under the “Advanced_Inkplate_Features” category. The code is straightforward since it uses similar functions to write to or read from pins as Arduino.