You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Or maybe:

    analogWrite(D5,0.002, { freq : 1 } );
    setTimeout(function() { digitalWrite(D5,0); }, 500);

    So use the hardware PWM to do the output, then cancel it in software after the first one - leave the duty cycle low enough that any jitter in execution by Espruino won't be an issue.


Avatar for Gordon @Gordon started