Last active
December 5, 2016 08:39
-
-
Save tumugin/ee2b59e73cea9e3962c1d0cf34e4f58f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcc -I/usr/local/include -L/lib test.c -o test -lwiringPi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <wiringPi.h> | |
#include <stdio.h> | |
int main (void) | |
{ | |
int pin = 1; // GPIO PD14 | |
if (wiringPiSetup() == -1) | |
return 1; | |
printf("setupOK\n"); | |
pinMode(pin, OUTPUT); | |
while (1) | |
{ | |
printf("loop\n"); | |
digitalWrite(pin, 1); | |
delay(1000); | |
digitalWrite(pin, 0); | |
delay(1000); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment