Flash 2 LEDs
This commit is contained in:
parent
4e6466ad50
commit
26f4ed45d3
1 changed files with 24 additions and 4 deletions
|
@ -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…
Reference in a new issue