Oh, I just looked again - and you're just creating a Waveform, not doing anything, and then reading back the values. It's not really surprising the array is just full of 0?
What about doing what's described on the waveform page, and using the finish event?
var w = new Waveform(128);
w.on("finish", function(buf) { //<----------- this
// your temperature reading code
});
w.startInput(A0,2000,{repeat:false});
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.
Oh, I just looked again - and you're just creating a Waveform, not doing anything, and then reading back the values. It's not really surprising the array is just full of 0?
What about doing what's described on the waveform page, and using the
finish
event?