Pages: [1]   Go Down
Author Topic: SerialEvent - how is this handled with multiple serial ports  (Read 169 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 2
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to use multiple (three) serial ports on an Arduino Due. Instead of polling the ports continuously, I would like to use a Serial.Event function for each of the ports. These handler functions will read out the incoming string from the port and parse the string (i.e. check for a pre-defined command and call a corresponding sub-routine).

I was wondering what is going to happen when serial data arrives at the same time at two different ports? For example, if the program is in the process of handling/parsing the first serial message, will it interrupt/abandon this process as soon as another SerialEvent on another port is triggered? Or will it complete the first SerialEvent routine before going to the second one?

Pages: [1]   Go Up
Jump to: