作者:bf1996 | 更新时间:2019-06-05 | 浏览量:1029
手机端控制继电器有很高延迟 ,比如说控制继电器开关时,继电器没有反应,手机上要连续按几下才有反应???
void setup() {
// initialize digital pin 13 as an output.
pinMode(5, OUTPUT);
pinMode(4, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(5, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(4, HIGH);
delay(1000);
digitalWrite(4, LOW);
delay(1000);
}