arduino/flashLed/flashLed.ino

37 lines
733 B
Arduino
Raw Normal View History

2016-07-01 09:22:27 +00:00
/*******************
* Notes
*******************
* Note that you need to make sure that for LEDs, the circuit goes
* in this order:
* 1. Output Pin
2016-07-02 14:02:36 +00:00
* 2. Resistor
* 3. LED
2016-07-01 09:22:27 +00:00
* 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.
*
*/
2016-07-01 09:10:05 +00:00
// Pin declarations
2016-07-01 09:22:27 +00:00
int ledPinAOut = 12;
int ledPinBOut = 11;
2016-07-01 09:10:05 +00:00
void setup()
{
Serial.println("Performing setup...");
2016-07-01 09:22:27 +00:00
pinMode(ledPinAOut, OUTPUT);
pinMode(ledPinBOut, OUTPUT);
2016-07-01 09:10:05 +00:00
}
void loop()
{
2016-07-01 09:22:27 +00:00
Serial.println("Loop");
digitalWrite(ledPinAOut, HIGH);
digitalWrite(ledPinBOut, LOW);
2016-07-01 09:10:05 +00:00
delay(1000);
2016-07-01 09:22:27 +00:00
digitalWrite(ledPinAOut, LOW);
digitalWrite(ledPinBOut, HIGH);
2016-07-01 09:10:05 +00:00
delay(800);
}