Go Down

Topic: SoftwareSerial library (Read 1 time) previous topic - next topic

egroJ

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.

Patouf

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.
L.C.

TheKitty

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
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview