function lampOnOff(out,q){
if (q==1)out.set();
else if (q==2){ // flashes for 3 sec's
out.reset();
setTimeout(function(){out.set() ;},500);
setTimeout(function(){out.reset();},1000);
setTimeout(function(){out.set(); },1500);
setTimeout(function(){out.reset();},2000);
setTimeout(function(){out.set();} ,2500);
setTimeout(function(){out.reset();},3000);
}
else out.reset();
}
function onInit(){
setInterval(function(){lampOnOff(B5,2);},4000);
setInterval(function(){lampOnOff(B6,2);},4000);
Serial3.setConsole();
}
if I plug USB cable, both B5 and B6 flash simultaneously.
if USB cable unplugged, periods of outputs shift relative to each other.
and start working synchronously again if I put USB back.
I can explain it.. console moved from USB. And I have even no webIDE launched.
How i can make flashing
outputs synchronously without USB?
thanks!
ps: board F4Discovery; Espruino ver 1.67
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
hi, All! look:
if I plug USB cable, both B5 and B6 flash simultaneously.
if USB cable unplugged, periods of outputs shift relative to each other.
and start working synchronously again if I put USB back.
I can explain it.. console moved from USB. And I have even no webIDE launched.
How i can make flashing
outputs synchronously without USB?
thanks!
ps: board F4Discovery; Espruino ver 1.67