Sometimes knowing which rock to turn over will speed up the learning process. The key was in this line:
'it doesnt work. But once i open up Espruino IDE and click "Send to Espruino", it works again.'
Just so happens I remembered I had turned over that same rock a while back.
It takes quite a bit of time to learn all the nuances of a new environment and sometimes staring at the same code for hours on end, blocks the insight to get over the finish line. Don't be so hard on yourself.
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.
Sun 2018.09.16
Hello @user94069 George,
Sometimes knowing which rock to turn over will speed up the learning process. The key was in this line:
Just so happens I remembered I had turned over that same rock a while back.
It takes quite a bit of time to learn all the nuances of a new environment and sometimes staring at the same code for hours on end, blocks the insight to get over the finish line. Don't be so hard on yourself.
I'm glad you found success with an easy fix.