23 lines
381 B
C
23 lines
381 B
C
#include <wiringPi.h>
|
|
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
void blink(int pin) {
|
|
digitalWrite (pin, HIGH);
|
|
delay (500);
|
|
digitalWrite (pin, LOW);
|
|
delay (500);
|
|
}
|
|
int main(){
|
|
wiringPiSetup();
|
|
int i;
|
|
while(true){
|
|
printf("Write pin: ");
|
|
scanf("%d", &i);
|
|
pinMode (i, OUTPUT);
|
|
printf("Blinking: (%d)\n", i);
|
|
blink(i);
|
|
blink(i);
|
|
}
|
|
return 0;
|
|
}
|