@DrAzzy, yes digitalPulse(). As for caveats, there are perhaps some misconceptions. I came at it reading and being told that the ESP8266 hardware's timer may not be accurate enough to facilitate accurate pulses, but seeing Arduino examples out there I was skeptical, and it turns out that's not the case.
Hat tip to @tve who helped me optimise my transmit code, but the major stumbling block was that pinMode needs to be set explicitly - we don't need to do that when running the core Espruino. With pinMode set my original code worked fine, although the switching was less reliable that the optimised code mentioned. Happy to share anything you need here.
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.
@DrAzzy, yes digitalPulse(). As for caveats, there are perhaps some misconceptions. I came at it reading and being told that the ESP8266 hardware's timer may not be accurate enough to facilitate accurate pulses, but seeing Arduino examples out there I was skeptical, and it turns out that's not the case.
Hat tip to @tve who helped me optimise my transmit code, but the major stumbling block was that pinMode needs to be set explicitly - we don't need to do that when running the core Espruino. With pinMode set my original code worked fine, although the switching was less reliable that the optimised code mentioned. Happy to share anything you need here.