You are reading a single comment by @user73560 and its replies. Click here to read the full conversation.
  • Hi @Gordon,

    I am running with firmware 1v99.50 and trying run your example at https://www.espruino.com/Waveform

    var w = new Waveform(1024,{doubleBuffer:true,bits:16­});
    var a = new Uint16Array(1024);
    w.on("buffer", function(buf) {
      a.set(buf);
      E.FFT(a);
      var m=0,n=-1;
      for (var i=100;i<500;i++)if(a[i]>n)n=a[m=i];
      console.log(m.toFixed(0)+"Hz @ "+n);
    });
    w.startInput(D2,1024,{repeat:true});
    

    but have :
    ***Uncaught Error: Insufficient stack for computing FFT
    at line 8 col 12

    E.FFT(a);***
    

    Is it possible to measure 500Hz frequency or we are restricted by the Puck's memory ?

About

Avatar for user73560 @user73560 started