You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

1 lines
617 B

gpio.mode(2,gpio.OUTPUT);_b=db.get('_b');if _b==nil then _b=0;end;F_b=_b;_d=db.get('_d');if _d==nil then _d=0;end;F_d=_d;_f=0;_e=0;F_e=_e;_c=0;F_c=_c;_g={};_h=0;gpio.write(2,_b%2);_h=function()_d=((_e=='play')and{1}or{((_e=='stop')and{0}or{_d})[1]})[1];end;tmr.create():alarm(10,tmr.ALARM_AUTO,function()if not(F_b==_b)then gpio.write(2,_b%2);db.set('_b',_b)end;F_b=_b;if not(F_d==_d)then _f=2;db.set('_d',_d)end;F_d=_d;if not(F_e==_e)then _h();end;F_e=_e;if not(F_c==_c)then _h();end;F_c=_c;if not(_f==0)then _f=_f-1;end;if _f==1 then _b=_d;end;_e=_g.reg;_c=_g.trigger;end);node.LFS.bigiot()('21249','ee37b3a2a',_g);