Replies: 3 comments 1 reply
-
When you build for the M5Stack Core2 using trace(button.a.read(), "\n");
trace(button.b.read(), "\n");
trace(button.c.read(), "\n"); Or, to eliminate polling, you can install a callback function to be invoked when the button changes state. button.a.onChanged = function() {
trace(this.read(), "\n");
}
That works for many devices, but not here. The buttons on M5Stack Core2 are virtual. They are actually part of the touch screen, so they aren't directly connected to a GPIO. |
Beta Was this translation helpful? Give feedback.
-
Looking in In If button.a has an So, for the |
Beta Was this translation helpful? Give feedback.
-
Thanks, that works well. This is fantastic platform, I'm very impressed with what you have achieved with it. |
Beta Was this translation helpful? Give feedback.
-
I was wondering what module to use to interact with the core2 cap-touch buttons.
I have built a menu system following the example on the wifi-config example in the docs.
I guess I could go with pins/digital module and setup a loop but I've seen examples where device is imported from device.
And I've also seen examples where m5button is used and I'm not sure whats the best approach for this.
Anyone got any advice.
Beta Was this translation helpful? Give feedback.
All reactions