1) Yes - but you need w.startInput(D2,1024,{repeat:true}); - so you're still getting a 1kHz set of data, but for half a second. Less accurate but otherwise usually more than good enough.
2) I'm not sure I understand the question? For now, you could use a JS implementation of FFT that stored the results in 32 bit Float32Arrays. There is actually an open issue about switching the FFT to 32 bits from 64, as it'd be faster and I don't think anyone would really be impacted.
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.
1) Yes - but you need
w.startInput(D2,1024,{repeat:true});
- so you're still getting a 1kHz set of data, but for half a second. Less accurate but otherwise usually more than good enough.2) I'm not sure I understand the question? For now, you could use a JS implementation of FFT that stored the results in 32 bit Float32Arrays. There is actually an open issue about switching the FFT to 32 bits from 64, as it'd be faster and I don't think anyone would really be impacted.