Hello,
I have an Inplate13Spectra and want to check the status of the buttons. How can I do that in the Arduino IDE? I couldn’t find an example for this.
Thank you,
Andre
Hello,
I have an Inplate13Spectra and want to check the status of the buttons. How can I do that in the Arduino IDE? I couldn’t find an example for this.
Thank you,
Andre
On the Inkplate 13SPECTRA, only the Wake button is available for use in your own code. You can access it at GPIO 18. Here is a simple example (without debouncing) that reads and prints its state:
#define INPUT_PIN 18
void setup() {
Serial.begin(115200);
pinMode(INPUT_PIN, INPUT);
}
void loop() {
int state = digitalRead(INPUT_PIN);
Serial.println(state);
delay(200);
}
If you need additional buttons, you can wire them up to the expander pins instead. The code for that is available via this example.