-
-
Save artistio/b5a4ca4b332de0020285 to your computer and use it in GitHub Desktop.
Blinking LED sketch for Arduino
This file contains 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
/* | |
* copyleft 2005 DojoDave <http://www.0j0.org> | |
* http://arduino.berlios.de | |
* | |
* based on an orginal by H. Barragan for the Wiring i/o board | |
*/ | |
int ledPin = 13; // LED connected to digital pin 13 | |
void setup() | |
{ | |
pinMode(ledPin, OUTPUT); // sets the digital pin as output | |
} | |
void loop() | |
{ | |
digitalWrite(ledPin, HIGH); // sets the LED on | |
delay(1000); // waits for a second | |
digitalWrite(ledPin, LOW); // sets the LED off | |
delay(1000); // waits for a second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment