#include "millisDelay.h"
int led1 = 2;
int led2 = 3;
// Pin 13 has an LED connected on most Arduino boards.
bool led1On = false; // keep track of the led state
bool led2On = false; // keep track of the led state
millisDelay led_1_Delay;
millisDelay led_2_Delay;
void setup()
{
// initialize the digital pin as an output.
pinMode(led1, OUTPUT); // initialize the digital pin as an output.
pinMode(led2, OUTPUT); // initialize the digital pin as an output.
// start delay
led_1_Delay.start(700);
led_2_Delay.start(5000);
}
void loop()
{
// check if delay has timed out
if (led_1_Delay.justFinished())
{
led_1_Delay.repeat(); // start delay again without drift
// toggle the led
led1On = !led1On;
digitalWrite(led1, led1On);
}
if (led_2_Delay.justFinished())
{
led_2_Delay.repeat(); // start delay again without drift
// toggle the led
led2On = !led2On;
digitalWrite(led2, led2On);
}
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
led1:A
led1:C
led2:A
led2:C