Created
February 12, 2017 10:56
-
-
Save FrankWu100/96b002a237baaf8b4b29177dd4d8c154 to your computer and use it in GitHub Desktop.
TInker LED blink sample code
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<stdio.h> | |
#include<wiringPi.h> | |
// LED Pin - wiringPi pin 0 is Physical pin 11. | |
#define LED_Pin 0 | |
int main(void) | |
{ | |
printf("Tinker blink\n"); | |
wiringPiSetup(); | |
pinMode(LED_Pin, OUTPUT); | |
for(;;) | |
{ | |
digitalWrite(LED_Pin, HIGH); | |
delay(500); | |
digitalWrite(LED_Pin, LOW); | |
delay(500); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment