• Please could you try:

    function sendCommand(command) {
      var bits = (CODE & ~0b11111) | command;
      var pulses = [];
      for (var i=24;i>=0;i--) {
        if ((bits>>i)&1) {
          pulses.push(0.9,0.3);
        } else {
          pulses.push(0.3,0.9);
        }
      }
      pulses.push(0.001);
      digitalPulse(TX,1,pulses);
    }
    

    That might fix it - it's possible that because the Pixl is a bit slower than STM32 boards it's actually struggling to go around the loop and call digitalPulse again before all the pulses have already gone out?

    Sending them all in one go might sort it.

About

Avatar for Gordon @Gordon started