puck.js not reliable

Posted on
  • I use a puck.js for sending midi controller over bluetooth. It worked for while (on 2 different computers, Win and OSX) but after a while, the puck stops been reliable. It sends the midi data and then stops working. It doesn't respond anymore and I have to upload the code again to be able to use it. Any idea what the problem could be? Is it possible the puck is defective?

    I upgraded the firmware to 2.04 with no success.

    This is the code:

    var midi = require("ble_midi");
      var isLong = (e.time-e.lastTime)>1;
      if (isLong) {
        midi.send(0, 101, 100);
    setTimeout(function() {
    midi.send(0, 101, 100);
    digitalPulse(LED1,1,5);}, 100);
      } else {
        midi.send(0, 126, 100);
    }, BTN, {repeat:true, debounce:50, edge:"falling"});
  • This might be a known issue with 2v0x versions (it'll be fixed for 2v05 and is fixed in cutting edge builds already) - if you write to the console while you're connected via Bluetooth but nothing is reading from the Bluetooth console then after a while the output buffer gets full and it stops responding (until it it cleared).

    If you comment out the console.log it might start working again?

  • Ok but sometimes only after 10 messages it stops responding.

  • Did this or the SW update solve your problem?

  • I think the quality of the battery helped. But definitely loading the code onto the dead memory helped to avoid uploading the code every time.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

puck.js not reliable

Posted by Avatar for user103345 @user103345