pyupm_button module

class pyupm_button.Button(pin)[source]

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

installISR(level, isr, arg)[source]

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.

name()[source]

std::string name()

Gets the name of the sensor

Name of this sensor

uninstallISR()[source]

void uninstallISR()

Uninstalls the previously installed ISR

value()[source]

int value()

Gets the value from the GPIO pin

Value from the GPIO pin