2015-12-26 20:08:50 +02:00
|
|
|
/*
|
|
|
|
|
* Blink
|
|
|
|
|
* Turns on an LED on for one second,
|
|
|
|
|
* then off for one second, repeatedly.
|
|
|
|
|
*/
|
2014-05-18 23:41:07 +03:00
|
|
|
|
2015-12-26 20:08:50 +02:00
|
|
|
#include "Arduino.h"
|
2014-06-21 22:27:58 +03:00
|
|
|
|
2015-12-26 20:08:50 +02:00
|
|
|
void setup()
|
|
|
|
|
{
|
2016-01-04 03:34:47 +02:00
|
|
|
// initialize LED digital pin as an output.
|
2015-12-26 20:08:50 +02:00
|
|
|
pinMode(LED_BUILTIN, OUTPUT);
|
2014-05-18 23:41:07 +03:00
|
|
|
}
|
|
|
|
|
|
2015-12-26 20:08:50 +02:00
|
|
|
void loop()
|
|
|
|
|
{
|
|
|
|
|
// turn the LED on (HIGH is the voltage level)
|
|
|
|
|
digitalWrite(LED_BUILTIN, HIGH);
|
|
|
|
|
// wait for a second
|
|
|
|
|
delay(1000);
|
|
|
|
|
// turn the LED off by making the voltage LOW
|
|
|
|
|
digitalWrite(LED_BUILTIN, LOW);
|
|
|
|
|
// wait for a second
|
|
|
|
|
delay(1000);
|
2014-06-02 20:55:20 +03:00
|
|
|
}
|