You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the buttons on the Tufty2040 badge did not work in my code based on the drawing example code. I tried copying from other examples which used the buttons on other boards with
if(button_a.read()) {
//Do stuff
}
But neither this, or trying to read button_a.raw() appeared to ever return true. A hint from Phil in a Twitter reply enabled me to work out how to change the button definitions in the example so that they work. I've tested with all 5 buttons. If you define the buttons as follows with the Polarity High then the button.read() call returns true when the button is pressed:
I found the buttons on the Tufty2040 badge did not work in my code based on the drawing example code. I tried copying from other examples which used the buttons on other boards with
But neither this, or trying to read button_a.raw() appeared to ever return true. A hint from Phil in a Twitter reply enabled me to work out how to change the button definitions in the example so that they work. I've tested with all 5 buttons. If you define the buttons as follows with the Polarity High then the button.read() call returns true when the button is pressed:
Suggesting this is updated in the example for tutfy2040
The text was updated successfully, but these errors were encountered: