Hi guys,
I need your help because I need execute a sync delay similar to Arduino function built-in. Like this:
module.moveServo(0,1000);
module.wait(5000); // this code must be stop the execution until the time is completed
module.moveServo(1,1000);
I tried with:
Contents of module_file.js:
exports.wait = (time) =>{
var i = 0;
while(i < time * 10) { i++; }
console.log("Done!");
}
I tried also with:
const startPoint = new Date().getTime()
while (new Date().getTime() - startPoint <= ms) {/* wait */}
And the result when tried to call more that 3000 ms is a dump and reset with this log:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0
tail 8
chksum 0xd8
csum 0xd8
2nd boot version : 1.6
SPI Speed : 80MHz
SPI Mode : DIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000
âìoärûo|ìdldl`c²ð|rdoàoãl odûþLoading 4948 bytes from flash...
What's happened? I'm very stressed with this.
Thanks and XoXo,
Hi guys,
I need your help because I need execute a sync delay similar to Arduino function built-in. Like this:
I tried with:
Contents of module_file.js:
I tried also with:
And the result when tried to call more that 3000 ms is a dump and reset with this log:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0
tail 8
chksum 0xd8
csum 0xd8
2nd boot version : 1.6
SPI Speed : 80MHz
SPI Mode : DIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000
âìoärûo|ìdldl`c²ð|rdoàoãl odûþLoading 4948 bytes from flash...
What's happened? I'm very stressed with this.
Thanks and XoXo,