18 lines
358 B
C
18 lines
358 B
C
#include <wiringPi.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
int main(int argc, char **argv){
|
|
wiringPiSetup();
|
|
if(argc <= 1){
|
|
printf("No arguments\n");
|
|
return 1;
|
|
}
|
|
for(int i=1; i < argc; i++){
|
|
const int cur = atoi(argv[i]);
|
|
printf("Shutting off pin %d\n", cur);
|
|
pinMode(cur, OUTPUT);
|
|
digitalWrite(cur, LOW);
|
|
}
|
|
return 0;
|
|
}
|