Skip to content

Instantly share code, notes, and snippets.

@ericevenchick
Last active December 15, 2015 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericevenchick/5331181 to your computer and use it in GitHub Desktop.
Save ericevenchick/5331181 to your computer and use it in GitHub Desktop.
Blinking LED sketch for Arduino
/*
* 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