5 channel chaser light
int m1a = 9; int m2a = 10; int m1b = 11; int m2b = 12; int m1c = 13; char val; void setup () { pinMode(m1a,OUTPUT); pinMode(m2a,OUTPUT); pinMode(m1b,OUTPUT); pinMode(m2b,OUTPUT); pinMode(m1c,OUTPUT); } void loop () { digitalWrite(m1a,HIGH); delay(100); digitalWrite(m1a,LOW); digitalWrite(m2a,HIGH); delay(100); digitalWrite(m2a,LOW); digitalWrite(m1b,HIGH); delay(100); digitalWrite(m1b,LOW); digitalWrite(m2b,HIGH); delay(100); digitalWrite(m2b,LOW); digitalWrite(m1c,HIGH); delay(100); digitalWrite(m1c,LOW); }
Comments
Post a Comment