There was another question recently related to someone doing this for a motor controller.
In the end, they had some success using a setTimeout and digitalWrite with a period that they'd worked out from the data length...
It's not ideal... I guess another option might be if I added a 'waitUntilSent' method for serial. Due to the delay of executing the pin might not change state immediately, but it may well be good enough.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
There was another question recently related to someone doing this for a motor controller.
In the end, they had some success using a setTimeout and digitalWrite with a period that they'd worked out from the data length...
It's not ideal... I guess another option might be if I added a 'waitUntilSent' method for serial. Due to the delay of executing the pin might not change state immediately, but it may well be good enough.