None of those methods is great. It's virtually impossible to ever get a string of data that you can send. Sure, you can do a little better sometimes, but really not that much and there are loads of cases where it's very hard to improve.
Can you not do what we do on nRF5x? Figure out what we need to send in an IRQ that happens just before data is sent?
If not, how about:
Or just skip the timer and send the first character on its own. That's what I did originally and it works reasonably well.
© Espruino, powered by microcosm.
Report a problem