Created
November 6, 2015 10:27
-
-
Save ryuichiueda/29e9675e20ec75e09e32 to your computer and use it in GitHub Desktop.
wiringPi LED blink
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 <stdlib.h> | |
const int gpio21 = 21; | |
int main(int argc, char const* argv[]) | |
{ | |
if(wiringPiSetupGpio() == -1) | |
exit(1); | |
pinMode(gpio21, OUTPUT); | |
while(1){ | |
digitalWrite(gpio21, 0); | |
delay(100); | |
digitalWrite(gpio21, 1); | |
delay(100); | |
} | |
exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment