20181023w
花括号数组对象变量:{ }
pwm.setup(4,300,1000)
pwm.start(4)
print(‘Setting up WIFI…’);
wifi.setmode(wifi.STATION);
wifi.sta.config({ssid=“YKLYQZT”,pwd="**********"});
wifi.sta.connect();
tmr.alarm(1, 1000, tmr.ALARM_AUTO, function()
if wifi.sta.getip() == nil then
print(‘Waiting for IP …’)
else
print('IP is ’ … wifi.sta.getip())
tmr.stop(1)
end
end)
tmr.alarm(1, 500, tmr.ALARM_AUTO, function()
if wifi.sta.getip() == nil then
print(‘Waiting for IP …’)
else
print('IP is ’ … wifi.sta.getip())
http.get(‘http://www.baidu.com’,nil,nil)
pwm.setup(4,20,1000);
pwm.start(4);
end
end)
bad arg