int timer=100;
void setup() {
// put your setup code here, to run once:
for(int i=2;i<7;i++)
{
pinMode(i,OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=2; i<7;i++)
{
digitalWrite(i,HIGH);
delay(timer);
digitalWrite(i,LOW);
}
for(int i=6 ;i>=2;i--)
{
digitalWrite(i,HIGH);
delay(timer);
digitalWrite(i,LOW);
}
}
沒有留言:
張貼留言