作者:bf1996 | 更新時間:2019-06-05 | 瀏覽量:762
手機端控制繼電器有很高延遲 ,比如說控制繼電器開關時,繼電器沒有反應,手機上要連續按幾下才有反應???
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);
}