3 Replies Latest reply on Feb 2, 2016 12:20 AM by nitewing117

    SoftwareSerial equivalent?


      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).

        • 1. Re: SoftwareSerial equivalent?

          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.  

          • 2. Re: SoftwareSerial equivalent?

            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, 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.




            • 3. Re: SoftwareSerial equivalent?

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

              SparkFun Analog/Digital MUX Breakout - CD74HC4067


              and this blog for understanding how to hook it up:

              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.