However, "NO CR" is echoing out 5 times instead of only 4. I have no idea why \r is getting stored to the phValue when the if statement I think should of filtered \r out. Can anyone explain why this is happening?
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.
I did:
That code removes the last character as expected.
In my previous forum post I explained that I attempted to catch the \r by doing:
However, "NO CR" is echoing out 5 times instead of only 4. I have no idea why \r is getting stored to the phValue when the if statement I think should of filtered \r out. Can anyone explain why this is happening?