This is an API to control Beaglebone's GPIO and an application to exemplify the use of API on controling cpu usage of Jessie (Debian for Beaglebone) system's processes. The API was developed in C++ and can be used to: export, unexport, get direction, set direction, set value and get value of pins. The example catches cpu usage on file /proc/stat and catches cpu usage of processes on file /proc/[pid]/stat.
Using this application requires Boost Filesystem Library:
Debian Based: sudo apt-get install libboost-all-dev
Fedora: yum install boost-devel
Check documentation.
#include <iostream>
#include "GPIOSystem.h"
#include "Pin.h"
int main(void) {
Pin redled {"P9_14", GPIOSystem::Direction::IN, GPIOSystem::Value::LOW};
return 0;
}
VinĂcius Campos | Vitor Greati |