Pages: [1]   Go Down
Author Topic: SoftwareSerial library  (Read 999 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

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.

Thanks.

Regards.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

L.C.

US
Offline Offline
Full Member
***
Karma: 4
Posts: 183
Electronics are the new Legos
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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");
Logged

Pages: [1]   Go Up
Jump to: