Your issue in this case is you're trying to use software serial - it's a reasonably new addition and it struggles on Bluetooth boards with this kind of thing because the second data is received it prints it to Bluetooth, which uses up a bunch of CPU time which then interferes with reception/transmission.
If you actually use the first example on that page which is for hardware serial, you get:
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.
Hi,
Your issue in this case is you're trying to use software serial - it's a reasonably new addition and it struggles on Bluetooth boards with this kind of thing because the second data is received it prints it to Bluetooth, which uses up a bunch of CPU time which then interferes with reception/transmission.
If you actually use the first example on that page which is for hardware serial, you get:
I just tried this on an MDBT42, and I get:
so it works great.
So basically all you need to do is replace:
with: