Go Down

Topic: SoftwareSerial library (Read 2725 times) previous topic - next topic



We are using the Arduino Due with a Serial LCD. I have some problems when I try to verify the code.

We use the SoftwareSerial library and when I verify a code using the Arduino IDE, with Arduino Due, it gives me the next message:

    "/arduino-1.5.2/libraries/SoftwareSerial/SoftwareSerial.cpp:41: fatal error: avr/interrupt.h: No such file or directory
    compilation terminated."

I haven't got this problem using the Arduino UNO.

Can you help me with this problem? I have read that there are some problems with some libraries but I can't find a solution to use SoftwareSerial with the Arduino Due.




There is still no software serial library for the due, and anyway, the due has 4  hardware USARTs, you could use one of them.
Another thing, if you could include the software serial in your sketch, it means that you didn't selected the right board in the ide, that's why you can get compilation/uploading errors.


The Uno version (the only version available now) must use interrupts to handle polling.  On AVR processors, the include will bring in the right code to handle this.  But the Due has a different interrupt hangling scheme not compatible with the AVR.

As mentioned above, suggest you use one of the hardware serial lines (TX/RX).  You can use the "normal" routines for available, read, right.  Append a number to the instance if you chose the non-primary (usually USB anyway) for example Serial1.available(), Serial 3.println("hi");

Go Up