Reference Language | Libraries | Comparison | Changes
Reads a button's state and returns if it is HIGH or LOW.
Esplora.readButton(button)
button: the associated button that you wanto read. Valid argument are:
| SWITCH_1 or SWITCH_DOWN |
| SWITCH_2 or SWITCH_LEFT |
| SWITCH_3 or SWITCH_UP |
| SWITCH_4 or SWITCH_RIGHT |
| JOYSTICK_DOWN = JOYSTICK_BASE |
| JOYSTICK_LEFT = JOYSTICK_BASE+1 |
| JOYSTICK_UP = JOYSTICK_BASE+2 |
| JOYSTICK_RIGHT = JOYSTICK_BASE+3 |
LOW when pressed, HIGH when not pressed.
readJoystickSwitch() Reference Home
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.