解决了 是
-
- for(int i = 0;i<=3;i++){}
复制代码
的问题
更新代码如下:
-
-
- int Red = 13;
- int Yellow = 12;
- int Green = 11;
- void setup() {
- // put your setup code here, to run once:
- pinMode(Red,OUTPUT);
- pinMode(Yellow,OUTPUT);
- pinMode(Green,OUTPUT);
- }
-
- void loop() {
- // put your main code here, to run repeatedly:
- digitalWrite(Green,LOW);
- digitalWrite(Yellow,LOW);
- digitalWrite(Red,HIGH);
- delay(5000);
- for(int i = 0;i<=3;i++){
- digitalWrite(Green,LOW);
- digitalWrite(Yellow,HIGH);
- digitalWrite(Red,LOW);
- delay(1000);
- digitalWrite(Yellow,LOW);
- delay(1000);
- }
- digitalWrite(Red,LOW);
- digitalWrite(Yellow,LOW);
- digitalWrite(Green,HIGH);
- delay(5000);
- }
复制代码
|