Referencia para la versión de Wiring 1.0 Build 0100+. Si tiene una versión previa, use la referencia incluida con su software. Si encuentra errores o tiene comentarios, no dude en contactarnos.
| Clase | Button |
||
|---|---|---|---|
| Nombre | releaseHandler() |
||
| Ejemplos | #include <Button.h> /* Wire like this: GND -----/ button ------ pin 12 */ Button button = Button(12,BUTTON_PULLUP_INTERNAL); void handleButtonReleaseEvents(Button & btn) { Serial.println("release"); digitalWrite(WLED,LOW); } void setup() { Serial.begin(9800); pinMode(WLED,OUTPUT); button.releaseHandler(handleButtonReleaseEvents); } void loop() { button.isPressed(); //update internal state /* Feel free to do your own processing here. The buttons will be handeled 'automagically' by the handler functions */ } |
||
| Descripción | Define una función que será llamada cuando el botón sea soltado. | ||
| Sintaxis | releaseHandler(handler) |
||
| Parámetros |
|
||
| Retorna | Ninguno | ||
| Uso | Application |

