You are reading a single comment by @tage and its replies. Click here to read the full conversation.
  • Ok, I figured out a way. There must be more elegant ways to do this, but at least now I can see what I am receiving and I can take some actions depending on the messages.

    Serial1.setup(2400/*baud*/);
    Serial1.onData(function (e) { 
      var tr=(e.data);
      p=tr.charCodeAt(0);
      print(p);
      switch (p)
      {
        case 80 :
          var s = "CV,1.6A to 3A"; 
          print(s);
          break;
        case 96 :
          var s2 = "CV, < 1.6A"; 
          print(s2);
          break;
        case 85 :
          break;
        default :
          var s3="*";
          print(s3);
      }
    });
    
About

Avatar for tage @tage started