Skip to content

Instantly share code, notes, and snippets.

@theokelo
Last active January 10, 2018 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theokelo/78aee4ddf698f7d18a2a to your computer and use it in GitHub Desktop.
Save theokelo/78aee4ddf698f7d18a2a to your computer and use it in GitHub Desktop.
Arduino Blinking LED Code
// Example 01 : Blinking LED
const int LED = 13; // LED connected to digital pin 13
void setup ()
{
pinMode(LED, OUTPUT); //sets the digital pin as output
}
void loop()
{
digitalWrite(LED, HIGH); //turns the LED on
delay (1000); //waits for a second
digitalWrite (LED, LOW); //turns the LED off
delay(3000); //changed this to 3 secs rather than 1 :)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment