Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
1,119 Views

SoftwareSerial equivalent?

Jump to solution

Hi All,

I'm trying to transfer a project over from an Arduino board to an Intel Edison, but I'm having some trouble figuring out how to configure an XBee and an Adafruit GPS on the Edison. I've figured out how to get my XBee connected as Serial1, but I'm unsure of what to do with the GPS unit. From what I've searched, SoftwareSerial will not work with the Edison, so I'm stuck. The original code initializes ports 2+3 with SoftwareSerial in the original Arduino code.

Any recommendations on how I can get the GPS setup? The general functionality is that the GPS coordinates are fed through the XBee to a remote computer (not connected to the internet).


Accepted Solutions
Highlighted
Employee
13 Views

Hello nitewing117,

That's right. The SoftwareSerial library is not supported in Edison and there isn't an equivalent for it.

As Reach41 suggested, you could use external hardware to route the traffic from Serial1 to the devices you have. I recommend you to check the following IC: http://www.ti.com/lit/ds/symlink/sn74lv4052a.pdf http://www.ti.com/lit/ds/symlink/sn74lv4052a.pdf, it's a 4-channel analog multiplexer. You could use it to route the Serial1 port to your devices. You could even add two more and have a total of 4 serial devices managed by the Serial1 port.

Regards,

Diego.

View solution in original post

3 Replies
Highlighted
New Contributor I
13 Views

Interesting. I saw your comment while looking for a solution to the same problem, including both the Adafruit GPS and an Xbee. To handle it, I'm thinking of perhaps using some kind of logic gate to route traffic from Serial1 to either the Xbee or the GPS. I'm using the GPS coordinates on the Edison, but you may have to load them into the Edison and then regurgitate them to your remote computer.

0 Kudos
Highlighted
Employee
14 Views

Hello nitewing117,

That's right. The SoftwareSerial library is not supported in Edison and there isn't an equivalent for it.

As Reach41 suggested, you could use external hardware to route the traffic from Serial1 to the devices you have. I recommend you to check the following IC: http://www.ti.com/lit/ds/symlink/sn74lv4052a.pdf http://www.ti.com/lit/ds/symlink/sn74lv4052a.pdf, it's a 4-channel analog multiplexer. You could use it to route the Serial1 port to your devices. You could even add two more and have a total of 4 serial devices managed by the Serial1 port.

Regards,

Diego.

View solution in original post

Highlighted
Community Manager
13 Views

To update anyone else that may come across this thread, with some help from Reach41, I ended up using the following breakout:

https://www.sparkfun.com/products/9056 SparkFun Analog/Digital MUX Breakout - CD74HC4067

and this blog for understanding how to hook it up:

http://bildr.org/2011/02/cd74hc4067-arduino/ Muxing Around With The CD74HC4067 + Arduino

Since my project only requires the XBee to send data, I only used one of these for pin 1 (TX) on the Edison board so that it could communicate with both the GPS and XBee. Note that each multiplexer requires at minimum 4 digital pins to control what channel your desired pin is connected to, so plan accordingly.

0 Kudos