Pages: [1]   Go Down
Author Topic: [SOLVED] help me juggle 2 Software Serial ports?  (Read 372 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to find out how to have two serial cameras hooked up to one Arduino UNO. Apparently according to this very short blurb only one Software Serial port is active at a time:

http://arduino.cc/en/Reference/SoftwareSerial

Under limitation number one.


Here is a function I'm curious about: isListening(). Is it going to help me juggling between two serial ports?

http://arduino.cc/en/Reference/SoftwareSerialIsListening

The reference is the least clear. Any help regarding juggling between two serial ports? Thanks.
« Last Edit: June 15, 2013, 11:44:59 pm by liudr » Logged


Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Answered my own question by googling. I bet some others will have the same question. It turns out there is a function in the library called listen(). You do port.listen() to make it the active port. I bet isListening() tells you whether this port is listening.

http://arduino.cc/en/Reference/SoftwareSerialListen

http://arduino.cc/en/Tutorial/TwoPortReceive
Logged


Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46026
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I bet isListening() tells you whether this port is listening.
You'd win.
Logged

Pages: [1]   Go Up
Jump to: