Hello,
I am quite new to Espruino, (was similar to Arduino) and I really like Espruino more than Arduino.
So, I have written a simple code from examples -
var led;
require("IRReceiver").connect(5, function(code) {
if(code=="100000000111111110101100010100111") toggle();
//console.log(code);
});
function onInit() {
console.log("init running...");
digitalWrite(4, 1);
}
function toggle() {
led= !led;
digitalWrite(4, led);
}
save();
This code works really well. It reads signals and does his job. But, when I press button for 50 or 60 times, board restarts and says -
ets Jan 8 2013,rst cause:4, boot mode:(3,2)
wdt reset
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 : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000
âìoärûg|ìdd`ãrÛlþLoading 3031 bytes from flash...
I know that cause: 4 is watchdog reason. Also I know that ES8266 is not such powerful board to handle working on big data. And also I know that when it turns led, watchdog can trigger at that moment and if many of those situations will be, buffer simply goes full.
So, my question is - how I can fix this issue so that if I will press button for 500 times restart must not appair? Something that will stop watchog receiving data when board does another operations? I tried to do this with transistor - when I pressed button and code was recognized, transistor was shutting down IR receiver, but the problem was same.
Hello,
I am quite new to Espruino, (was similar to Arduino) and I really like Espruino more than Arduino.
So, I have written a simple code from examples -
This code works really well. It reads signals and does his job. But, when I press button for 50 or 60 times, board restarts and says -
I know that cause: 4 is watchdog reason. Also I know that ES8266 is not such powerful board to handle working on big data. And also I know that when it turns led, watchdog can trigger at that moment and if many of those situations will be, buffer simply goes full.
So, my question is - how I can fix this issue so that if I will press button for 500 times restart must not appair? Something that will stop watchog receiving data when board does another operations? I tried to do this with transistor - when I pressed button and code was recognized, transistor was shutting down IR receiver, but the problem was same.