two serials at the same time #4090
Unanswered
espruino-discuss3
asked this question in
General
Replies: 1 comment
-
Posted at 2014-09-10 by Loop 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. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-09-10 by Andrey
Hi, all!
I use two serials simultaneously.
Serial2.on('data', function (data) {...
and
Serial3.on('data', function (data2) {...
i cant write like
Serial3.on('data2', function (data2) {...
last one doesn't work
if both serials work, some wrong data I see in the serial buffer- doubled snippets...
how do I do it right?
Beta Was this translation helpful? Give feedback.
All reactions