4 Replies Latest reply on Jan 27, 2014 9:05 AM by Mikal.Hart

    SoftwareSerial library doesn't work

    vlvrd

      Hello makers.

       

      I was trying to import the SoftwareSerial library into my Galileo sketch when I realized my Arduino IDE didn't make it available for me to work on, even though I see the folder in the Arduino IDE directory. I tried rebooting the application, rebooting the laptop, unzipping the IDE again and it didn't make a difference; I was wondering if you can import the SoftwareSerial library from another version of IDE without problem for Galileo use and if any other person has run into this problem.

       

      According to this FAQ (https://communities.intel.com/message/207619, last question), use is enabled but not encouraged. The code I was testing was the Adafruit Ultimate GPS - Echo Example, but for debugging purposes I'm only trying to compile an (almost) empty sketch:

       

      #include <SoftwareSerial.h>

       

      void setup() {

      }

       

      void loop() {

      }

        • 1. Re: SoftwareSerial library doesn't work
          Intel_Jesus

          Hi vlvrd,

           

          Sorry no one has addressed your issue.

          I am looking into the Software Serial library.

           

          Regards,

          Intel_JEspinoza

          • 2. Re: SoftwareSerial library doesn't work
            byron

            I just want to confirm I am having this issue as well. The library appears present under libraries but, when compiling, it says that it can't find the library.

            • 3. Re: SoftwareSerial library doesn't work
              Rod_H

              You said you see the folder in the Arduino IDE directory, can you see the file in the folder, for example in windows the file is:

               

              C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.h

               

              And if you can see the file, can you open it with an editor like notepad?

              • 4. Re: SoftwareSerial library doesn't work
                vlvrd

                Hi Rod_H and all.

                 

                There is in fact a SoftwareSerial.h (that calls a SoftwareSerial_Class.h file) and a SoftwareSerial.cpp. The SoftwareSerial_Class.h and SoftwareSerial.cpp are located in a folder called "avr", so that is why I thought I could use another IDE's Software Serial library.

                 

                Since I posted the question, I downloaded the 1.0.5. and the 1.5.5. versions of the IDE. Both versions had the same SoftwareSerial.h and SoftwareSerial.cpp files. Then, I compared them to the ones in the Galileo IDE and realized that the SoftwareSerial_Class.h and the SoftwareSerial.cpp are the same files as the ones in the other IDEs. Then, I found that the SoftwareSerial.cpp calls a file named interrupt.h that isn't found in the Galileo IDE (so the library probably doesn't work), but this still doesn't explain why the library isn't recognized by the IDE.

                 

                Thanks a lot for all the answers.

                1 of 1 people found this helpful
                • 5. Re: SoftwareSerial library doesn't work
                  byron

                  My issue may be different from vlvrd...

                   

                  1. I open the IDE under ~\Documents\arduino-1.5.3\

                  2. I open the example file located at ~\Documents\arduino-1.5.3\libraries\SoftwareSerial\examples\SoftwareSerialExample

                  3. I hit verify and the pre-processor returns:


                  SoftwareSerialExample.ino:28:28: fatal error: SoftwareSerial.h: No such file or directory

                  compilation terminated.

                   

                  It may be worth noting that I also have ~\Documents\Arduino with the official Arduino IDE since I am still obviously doing AVR development and I don't appear to be able to do this from the Intel branded version.

                   

                  Thanks,

                  Byron

                  • 6. Re: SoftwareSerial library doesn't work
                    Mikal.Hart

                    As the primary author of the original SoftwareSerial library that ships with Arduino (and now with Galileo), I can tell you with some certainty that this won't work as-is on Galileo.  There are quite a few dependencies on AVR in that code.

                     

                    I'm not yet an expert on Galileo architecture, but given what I know, I have to wonder whether SoftwareSerial is even possible on the Galileo, the curious statement in the FAQ (https://communities.intel.com/message/207619) notwithstanding.  If the fastest a general GPIO pin can toggle is ~230 Hz (see Re: I/O speeds?), then even 300 baud SoftwareSerial would seem out of the question, especially since the underlying OS is not real-time.

                     

                    I would love to be contradicted on this point by the way, but I think we need to correct that FAQ.