-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
I am missing something. I am using the M5GFX button to create buttons. How do I know when it has been touched (CoreS2)? If I check isPressed, it is always false.
At the beginning, I have it defined
`#include <M5GFX.h>
M5GFX display;
LGFX_Button startBtn;
`
startBtn.initButton(&display, 150, 122, 150, 150, TFT_RED, TFT_GREEN, TFT_BLACK, "START", 4, 4); startBtn.drawButton();
This is in my setup.
In my loop
if (startBtn.justPressed()) { Serial.println("GET data"); collecting = true; } if (startBtn.isPressed()) { Serial.println("GET data pressed"); collecting = true; }
How do I get the start button to be recognized when it is touched?
Metadata
Metadata
Assignees
Labels
No labels