The code that generated it (simplified down to a single DHT now):
var d;
var e;
var inits=new Uint8Array([0,0,0,0]);
var curdht=false;
var t=-1;
var rh=-1;
var t2=-1;
var rh2=-1;
var fs;
var havetraced=false;
function onInit() {
digitalWrite(A14,1);
digitalWrite(A13,1);
setTimeout("doInit();",2000);
}
function doInit() {
fs=require("fs");
fs.appendFile("timetemp5.log","Espruino restarted")
digitalWrite(A13,0);
d=require("DHT11dev").connect(C10);
d.read(function(a){ t=a.temp; rh=a.rh; inits[1]=1;endInit();});
}
function endInit() {
if (inits[1]==1 && inits [3]==0)
{
inits[3]=1;
digitalWrite(A14,0);
setInterval(function() {var mf=process.memory().free;console.log(mf.toString()+" "+getTime().toFixed().toString()); if (mf < 1100) traceit();doMeasure();},5000);
setInterval(function(){dologs();},30000);
setBusyIndicator(A13);
}
}
function traceit() {
if (!havetraced) {
havetraced=true;
trace();
}
}
function doMeasure() {
d.read(function(a) {
if (a.rh!=-1 && a.temp < 50) {
rh=a.rh;
t=a.temp;
}
});
}
function dologs() {
console.log("trying to log...");
fs.appendFile("timetemp6.log","DHT11,"+t.toString()+","+rh.toString()+",Time,"+getTime().toFixed()+"\n");
}
save();
Edit: No, unlike previous tests, log files were not normal.
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.
Still fails quickly in v57. So far the most stable version has been v55, where it would run for ~4 hrs.
Trace:
http://drazzy.com/espruino/v57failure.txt
The code that generated it (simplified down to a single DHT now):
Edit: No, unlike previous tests, log files were not normal.