AltSoftSerial and Servo libraries fails to compile

Status
Not open for further replies.

RigTig181

New member
I am using the robertsonics WAV Trigger board on a couple of different Arduinos. Until I added the Servo, all was working well compiling for both Uno and Nano. However, I now get error on compile (for source, see attachment):
"
Servo/Servo.cpp.o: In function `Servo::attached()':
/usr/share/arduino/libraries/Servo/Servo.cpp:336: multiple definition of `__vector_11'
AltSoftSerial/AltSoftSerial.cpp.o:/media/matt/2d3dp/sketchbook/libraries/AltSoftSerial/AltSoftSerial.cpp:92: first defined here
collect2: error: ld returned 1 exit status
"
Looking at AltSoftSerial.cpp, I cannot see any reference to `__vector_11'. Have I left something important out, or is there really an internal conflict?

View attachment DonationRobot.ino

In anticipation of your assistance and any advice, thank you.
Regards, RigTig181
 
or is there really an internal conflict?

Yes, Arduino Uno & Nano have only one 16 bit timer. But Servo and AltSoftSerial need it. You simply can't use both, due to the hardware limits.

If you step up to something like Teensy LC or 3.2, there are many timers and 3 real serial ports, so you can do much more without conflicts. There's also a lot more memory and the processor is faster, which also relieve the other painful limits you'd hit on Uno if things like the number of timers didn't stop you first.
 
Many thanks to Paul for quick reply. To get the talking robot working quickly, all I did was change the interface to the robertsonics WAV Trigger board to use the hardware triggers. Each message is triggered by a separate logic pin, so uses only a digitalPin.write() to initiate the 4 messages. The only time-consuming part was synchronising the mouth movement with the sound, which was done by calling a routine to open the mouth to a given fraction for a specified time, and doing it lots of times. All went well on the day, and the talking robot got donations (as it asked for them).
Thanks again to Paul. Obvious when I think about it, but the message was far too useless to make any sense to me at the time!
 
Status
Not open for further replies.
Back
Top