Skip to content

Instantly share code, notes, and snippets.

@KaduNovoK
Last active December 30, 2015 20:49
Show Gist options
  • Save KaduNovoK/7882794 to your computer and use it in GitHub Desktop.
Save KaduNovoK/7882794 to your computer and use it in GitHub Desktop.
Code to blink a LED on Arduino.
/**
* Code to blink a LED
*
* Author: Kadu NovoK
* Date: 12-09-2013
* Version: 1.0
*/
void setup() {
pinMode(13, OUTPUT); // Set the LED
}
void loop() {
digitalWrite(13, HIGH); // Turn on
delay(1000); // Wait a second
digitalWrite(13, LOW); // Turn off
delay(1000); // Wait a second
digitalWrite(13, HIGH); // Turn on
delay(100); // Wait 100 miliseconds
digitalWrite(13, LOW); // Turn off
delay(100); // Wait 100 miliseconds
digitalWrite(13, HIGH); // Turn on
delay(100); // Wait 100 miliseconds
digitalWrite(13, LOW); // Turn off
delay(100); // Wait 100 miliseconds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment