• 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();
    
    
About

Avatar for jacklee @jacklee started