Use your smartphone touch screen as an on or off button. Just two simple words can fit in your code so you can control things by checking the state of toggle button on your smartphone.
Learn more from the examples page.
This shield is one of the I/O shields. I/O shields provides simple function of using your smartphone as input or output to Arduino.
Learn more from the I/O shields tutorial.
ToggleButton library converts & simulates the smartphone as a real Hardware toggle button so that you can control physical objects surrounding you.
Adding #define CUSTOM_SETTINGS along with #define INCLUDE_TOGGLE_BUTTON_SHIELD is a key that will let you unlock the Toggle Button shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.
Checks if the button is pressed or not.
A yes “1” or no “0”.
bool value = ToggleButton.getStatus();
Sets a certain individual function written by the user in the sketch to be called and runs its functionality each time the toggle button is pressed.
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.
/* myFunction exists under the loop function. */
/* This function will be invoked each time a the button is pressed. */
void myFunction (bool isButtonPressed)
/*Turn on a LED if button pressed. */