int led;
void setup() {
// initialize the digital pin as an output.
for(led=10;led<14;led++)
{
pinMode(led, OUTPUT);
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
if(led==13)
{
for(led=13;led>=10;led--)
{
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
}
}
}
}
// the loop routine runs over and over again forever:
void loop() {
}
.jpg)
沒有留言:
張貼留言