arduino/flashLed/flashLed.ino
2016-07-01 10:22:27 +01:00

36 lines
733 B
C++

/*******************
* 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 ledPinAOut = 12;
int ledPinBOut = 11;
void setup()
{
Serial.println("Performing setup...");
pinMode(ledPinAOut, OUTPUT);
pinMode(ledPinBOut, OUTPUT);
}
void loop()
{
Serial.println("Loop");
digitalWrite(ledPinAOut, HIGH);
digitalWrite(ledPinBOut, LOW);
delay(1000);
digitalWrite(ledPinAOut, LOW);
digitalWrite(ledPinBOut, HIGH);
delay(800);
}