From 26f4ed45d32d21ee0af93fc8b1436c9183dee8b8 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 1 Jul 2016 10:22:27 +0100 Subject: [PATCH] Flash 2 LEDs --- flashLed/flashLed.ino | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/flashLed/flashLed.ino b/flashLed/flashLed.ino index 49d28bb..f64340a 100644 --- a/flashLed/flashLed.ino +++ b/flashLed/flashLed.ino @@ -1,16 +1,36 @@ +/******************* + * Notes + ******************* + * Note that you need to make sure that for LEDs, the circuit goes + * in this order: + * 1. Output Pin + * 2. LED + * 3. Resistor + * 4. Ground + * + * Failing to make sure that this order is followed will cause it to + * appear as the program hasn't been writteen to the device correctly. + * + */ + // Pin declarations -int ledPinOut = 12; +int ledPinAOut = 12; +int ledPinBOut = 11; void setup() { Serial.println("Performing setup..."); - pinMode(ledPinOut, OUTPUT); + pinMode(ledPinAOut, OUTPUT); + pinMode(ledPinBOut, OUTPUT); } void loop() { - digitalWrite(ledPinOut, HIGH); + Serial.println("Loop"); + digitalWrite(ledPinAOut, HIGH); + digitalWrite(ledPinBOut, LOW); delay(1000); - digitalWrite(ledPinOut, LOW); + digitalWrite(ledPinAOut, LOW); + digitalWrite(ledPinBOut, HIGH); delay(800); }