You are reading a single comment by @Loop and its replies. Click here to read the full conversation.
  • You should not write SerialN.on('data2'... ) beacause there is no such message. All serials can register a callback on the 'data' event. then the variable 'data' (which is a different thing from the name of the event) is local to the function, so no need to call it differently.

    So, what i mean is:

    Serial2.on('data', function(data) { console.log("Received " + data + "on serial2") });
    Serial3.on('data', function(data) { console.log("Received " + data + "on serial3") });
    

    should just work.

About

Avatar for Loop @Loop started