This repository has been archived by the owner on Dec 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
button_pressed
Mammad900 edited this page Aug 29, 2020
·
1 revision
Returns true if a button was pressed.
- Page (
int
) : The number of the page which contains the button - Index (
int
) : The index of the button relative to the page
True if the button is enabled, visible and being touched. Else, false.
//In loop()
if(button_pressed[0][1]){ //The second button in the first page
Serial.println("Clicked!");
}
Prints 'Clicked!' to serial monitor repeatedly while the button is being touched
//In loop()
if(button_pressed[2][0]){ //The first button in the third page
Serial.println("Clicked!")
while(button_pressed[2][0])checkPage(); // Wait until the button is released
}
Prints 'Clicked!' to serial monitor and waits until the button is released