pyupm_button module¶
Bases:
object
API for the Button.
ID: button
Name: Button
Other Names: Grove Button
Category: button
Manufacturer: seeed
Connection: gpio
Kit: gsk Basic UPM module for the button sensor
C++ includes: button.hpp
void installISR(mraa::Edge level, void(*isr)(void *), void *arg)
Installs an interrupt service routine (ISR) to be called when the button is activated or deactivated.
fptr: Pointer to a function to be called on interrupt
arg: Pointer to an object to be supplied as an argument to the ISR.
std::string name()
Gets the name of the sensor
Name of this sensor
void uninstallISR()
Uninstalls the previously installed ISR
int value()
Gets the value from the GPIO pin
Value from the GPIO pin