What you're doing sounds fine - and you've got the microphone powered from 3.3v as well? It sounds like the microphone won't output the complete 3.3v voltage range, but that's not a big deal - sound will just be maybe half as loud as it could be (and you can fix that in software afterwards by just multiplying the array up).
The Waveform class is definitely what you want - PWM is only for output.
The following code:
var w = new Waveform(128);
w.on("finish", function(buf) {
for (var i in buf)
console.log(buf[i]);
});
w.startInput(B0,2000,{repeat:false});
Should record something... Could you try running it while there is some sound for the microphone to record, and then see if any nonzero values get printed out?
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 you're doing sounds fine - and you've got the microphone powered from 3.3v as well? It sounds like the microphone won't output the complete 3.3v voltage range, but that's not a big deal - sound will just be maybe half as loud as it could be (and you can fix that in software afterwards by just multiplying the array up).
The Waveform class is definitely what you want - PWM is only for output.
The following code:
Should record something... Could you try running it while there is some sound for the microphone to record, and then see if any nonzero values get printed out?