Example: get state of a button. More...
Go to the source code of this file.
Macros | |
#define | PIN /* P8_07 */ |
include libpruio More... | |
Variables | |
VAR | io = NEW PruIo |
create a PruIo structure, wakeup devices More... | |
Example: get state of a button.
This file contains an example on how to use libpruio to get the state of a button connetect to a GPIO pin on the beaglebone board. Here pin 7 on header P8 is used as input with pullup resistor. Connect the button between P8_07 (GPIO input) and P8_01 (GND).
Licence: GPLv3
Copyright 2014 by Thomas{ dOt ]Freiherr[ At ]gmx[ DoT }net
Compile by:
fbc -w all button.bas
Definition in file button.bas.
#define PIN /* P8_07 */ |
include libpruio
include the convenience macros for header pins
Definition at line 25 of file button.bas.
VAR io = NEW PruIo |
create a PruIo structure, wakeup devices
Definition at line 29 of file button.bas.