Browse Source

Flash 2 LEDs

master
Starbeamrainbowlabs 5 years ago
parent
commit
26f4ed45d3
  1. 28
      flashLed/flashLed.ino

28
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);
}
Loading…
Cancel
Save