Hi all, kinda new to all this. I have code to make led lights flash (string lights) on and off. However, I'd like it to flash for a set time, then stay on until power is removed. What code would I need to add to my script? Thanks in advance.
Code is:
void setup(){
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
}
void loop(){
//show colour 1;
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
delay(500); //wait half a second
//show colour 2:
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
delay(500); //wait half a second
//any more pattern or changes here...
}
9 posts - 5 participants