From 814649450806a34c64d5d0e6403a3a4df7971946 Mon Sep 17 00:00:00 2001 From: "M. Stokroos" Date: Tue, 10 Jul 2018 15:03:45 +0200 Subject: [PATCH] Adding Blinky.ino and README.md --- sketches/Blinky/Blinky.ino | 26 ++++++++++++++++++++++++++ sketches/Blinky/README.md | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 sketches/Blinky/Blinky.ino create mode 100644 sketches/Blinky/README.md diff --git a/sketches/Blinky/Blinky.ino b/sketches/Blinky/Blinky.ino new file mode 100644 index 0000000..5a700eb --- /dev/null +++ b/sketches/Blinky/Blinky.ino @@ -0,0 +1,26 @@ +/* + Blinky + +Toggles the LED of the Arduino repeatedly on and off. + +by Martin Stokroos +m.stokroos@rug.nl +*/ + +#define PIN_LED 13 + +// the setup function called once after reset +void setup() { + // initialize digital pin connected to the LED as an output. + pinMode(PIN_LED, OUTPUT); +} + +// infinite program loop +void loop() { + digitalWrite(PIN_LED, HIGH); // turn the LED on + delay(500); // wait for half a second + digitalWrite(PIN_LED, LOW); // turn the LED off + delay(500); // wait for half a second +} + +// end diff --git a/sketches/Blinky/README.md b/sketches/Blinky/README.md new file mode 100644 index 0000000..2ce0438 --- /dev/null +++ b/sketches/Blinky/README.md @@ -0,0 +1,5 @@ +# Blinky + +Blinky is a simple Arduino sketch that blinks the LED on the Arduino. +The sketch was created for learning how to create a Git repository. +