libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
button2.bas File Reference

Example: get state of a button. More...

#include "BBB/pruio.bi"
#include "BBB/pruio_pins.bi"
Include dependency graph for button2.bas:

Go to the source code of this file.

Macros

#define PIN   /* P8_07 */
 The header pin to use.
 

Functions

int main ()
 

Variables

VAR io = NEW PruIo
 Create a PruIo structure, wakeup devices.
 

Detailed Description

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). Find a functional description in section button.

Licence: GPLv3, Copyright 2014-2023 by Thomas{ doT ]Freiherr[ At ]gmx[ DoT }net

Compile by: fbc -w all button.bas

Since
0.6

Definition in file button2.bas.

Function Documentation

◆ main()

int main ( )

The main function.

Definition at line 55 of file button2.bas.

Here is the call graph for this function: