Yes that works, got some errors to work though now but its at least calling it okay.
It appears some of my old function code doesn't work. I have tried reflashing the board but still errors.
Stepping all the way back to the code I posted in #19, I get the following error.
ERROR: Got '}' expected EOF at line 1 col 286
{I2C1.writeTo(104,0);var data=I2C1.readFrom(104,3);var seconds=("0"+data[0].toString(16)).substr(-2);var minutes=("0"+data[1].toString(16)).substr(-2);var hours=("0"+data[2].toString(16)).substr(-2);var rtcTime=hours+":"+minutes+":"+seconds;print(text,data);print(text,rtcTime);return}
^
at line 1 col 285
{I2C1.writeTo(104,0);var data=I2C1.readFrom(104,3);var seconds=("0"+data[0].toString(16)).substr(-2);var minutes=("0"+data[1].toString(16)).substr(-2);var hours=("0"+data[2].toString(16)).substr(-2);var rtcTime=hours+":"+minutes+":"+seconds;print(text,data);print(text,rtcTime);return}
^
in function called from system
ERROR: Error processing interval - removing it.
Execution Interrupted during event processing.
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.
Yes that works, got some errors to work though now but its at least calling it okay.
It appears some of my old function code doesn't work. I have tried reflashing the board but still errors.
Stepping all the way back to the code I posted in #19, I get the following error.