Skip to content

Instantly share code, notes, and snippets.

@ksahnine
Created July 7, 2016 18:19
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 ksahnine/1c6aac4893faed908f50a6050e54d8d3 to your computer and use it in GitHub Desktop.
Save ksahnine/1c6aac4893faed908f50a6050e54d8d3 to your computer and use it in GitHub Desktop.
/*
* Blink
* Turns on an LED on for one second,
* then off for one second, repeatedly.
*/
#include "Arduino.h"
void setup()
{
// initialize LED digital pin as an output.
pinMode(5, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(5, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(5, LOW);
// wait for a second
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment