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

    Yes recording in 8 bits is reasonable.

    I would like to send the clip to the client. I have following questions based on the code:

    var soundBuff;
    NRF.setServices({
      0xBCDE : {
        0xABCD : {
          value : "N/A",
          readable : true,   // optional, default is false
          writable : true,   // optional, default is false
          notify : true,   // optional, default is false
          onWrite : function(evt) { // optional
            var clipSeconds = evt.data[0];
            var w = new Waveform(512*clipSeconds,{bits:8});
            w.on("finish", function(buf) {
              soundBuff=buf;
              NRF.updateServices({
                0xBCDE : {
                  0xABCD : {
                    value : buf,
                    notify: true
                  }
                }
              });
            });
            w.startInput(D2,512);
          }
        }
      }
    });
    
    1. Is this the right way of doing this ?
    2. How can I free memory once the data is sent to the client ?
    3. How can I view the result with "nRF Connect"

    Thank you.

About

Avatar for user73560 @user73560 started