API for the Grove Button.
More...
- Deprecated:
- This class is being replaced by the upm-button library and the Button class.
- ID: grovebutton
- Name: Button
- Other Names: Grove Touch Sensor
- Category: button touch
- Manufacturer: seeed
- Connection: gpio
- Kit: gsk
Basic UPM module for the Grove button
while (1) {
std::cout << button.name() << " value is " << button.value() << std::endl;
upm_delay(1);
}
Grove button constructor
- Parameters
-
Gets the name of the sensor
- Returns
- Name of this sensor
Gets the value from the GPIO pin
- Returns
- Value from the GPIO pin
void installISR |
( |
mraa::Edge |
level, |
|
|
void(*)(void *) |
isr, |
|
|
void * |
arg |
|
) |
| |
Installs an interrupt service routine (ISR) to be called when the button is activated or deactivated.
- Parameters
-
fptr | Pointer to a function to be called on interrupt |
arg | Pointer to an object to be supplied as an argument to the ISR. |
Uninstalls the previously installed ISR
The documentation for this class was generated from the following files: