upm  1.2.0
Sensor/Actuator repository for libmraa (v1.6.1)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
_button_context Struct Reference

API for the Button. More...

Detailed Description

Basic UPM module for the button sensor

button.jpg
// Create the button object using GPIO pin 0
upm::Button* button = new upm::Button(0);
// Read the input and print, waiting one second between readings
while( 1 ) {
std::cout << button->name() << " value is " << button->value() << std::endl;
sleep(1);
}
// Delete the button object
delete button;

Data Fields

mraa_gpio_context gpio
 
uint8_t gpio_pin
 
bool isr_installed
 

The documentation for this struct was generated from the following file: