A C example to make work the LED on BeagleBone-Black and Pocket.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
// LED application in C by
|
|
// Gerado Marx Chavez Campos
|
|
// 26/04/2021
|
|
//
|
|
//
|
|
|
|
|
|
#include<stdio.h>
|
|
#include<stdlib.h>
|
|
#include<string.h>
|
|
|
|
#define LED3PATH "/sys/class/leds/beaglebone:green:usr3"
|
|
|
|
//Function prototypes
|
|
void WriteLED(char fileName[], char value[]);
|
|
void RemoveTrigger();
|
|
|
|
//main
|
|
int main(int argc, char* argvp[]){
|
|
if(argc!=2){
|
|
printf("Incorrect use...");
|
|
return 2;
|
|
}
|
|
printf("LED Application Done");
|
|
return 0;
|
|
}
|
|
|