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.
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.
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:
should just work.