Newbie here - literally opened my Arduino about 3 hours ago. I have been able to code 2 LEDs to blink randomly, but what I want to do is have one of the two blink every 10 seconds.
My current code:
void setup() {
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}
void loop() {
// set 2 random on/off values
byte on4 = random(2); //returns a random choice of 0 or 1
byte on5 = random(2);
//Write the value of each variable to the pins.
digitalWrite(4,on4);
digitalWrite(5,on5);
delay(500);
}
I know I have to do something to the loops, I just can't figure out what.