Ok, so this is on ESP8266? Maybe check E.getErrorFlags() to see if there was a buffer overflow.
It might be because the pin changes state during some action in internal ESP8266 code where IRQs are disabled, and so the response gets delayed.
I think at this point your option is either to use a proper Espruino or to just put up with it not responding correctly every time. As I understand it, the original one didn't work properly at all on ESP8266, so this is definitely an improvement.
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.
Ok, so this is on ESP8266? Maybe check
E.getErrorFlags()
to see if there was a buffer overflow.It might be because the pin changes state during some action in internal ESP8266 code where IRQs are disabled, and so the response gets delayed.
I think at this point your option is either to use a proper Espruino or to just put up with it not responding correctly every time. As I understand it, the original one didn't work properly at all on ESP8266, so this is definitely an improvement.