I have a code is working before but since the code is using Serial1.onData when i upload my code is get warning so i change the code above.
the older code
function onInit() { Serial1.setup(9600);} var trace = ""; Serial1.onData(function (e) { print("--->"+e.data); trace = +e.data; if(trace == "1" ){ digitalWrite(LED3,1); } if(trace == "0" ){ digitalWrite(LED3,0); } }); save();
@jacklee started
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 have a code is working before but since the code is using Serial1.onData when i upload my code is get warning so i change the code above.
the older code