arduino yun 关闭wifi
试着写了一段代码:#include <Process.h>int startPin = 7;
int stopPin = 6;
String strstart = "echo -n 'start' | socat - udp-connect:192.168.0.25:60002";
String strstop = "echo -n 'stop' | socat - udp-connect:192.168.0.25:60002";
void setup() {
pinMode(startPin, INPUT);
pinMode(stopPin, INPUT);
Bridge.begin();
//Serial.begin(9600);
}
void loop() {
Process p;
digitalWrite(startPin,HIGH);
digitalWrite(stopPin,LOW);
p.runShellCommand(strstart);
delay(3000);
digitalWrite(startPin,HIGH);
digitalWrite(stopPin,LOW);
p.runShellCommand(strstart);
delay(3000);
}
然后把wifi关了,断电重启,刚开始可以控制继电器,能ping通,但1-2分钟后继电器停止工作,ping也ping不同....
页:
[1]