function measureAndLog() {
var value;
// your measuring and calculation assigning result to value
console.log("CO2 measured: " + value + " [ppm]");
};
function cycle(){
console.log("waiting...");
setTimeout(function(){
measureAndLog();
cycle();
},300000); // 300'000[ms] = 5 [min]
}
cycle();
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.
...what about: