SoftwareSerial conflicting with Servo library?

I've got a project where I'm reading from a GPS chip via SoftwareSerial (328p, Software Serial on digital pins 4 and 7, servo on A2 and A3). My original code started the software serial, then occasionally read from it and manipulated the servo. What would happen is that the servo would twitch/hunt, badly. I would tell it to go to 90*, it would go to 90, and then run back and forth between 90 and 130. I'd tell it to go to 130, it would go to 130, and then hunt back and forth by a few degrees.

Not starting software serial eliminates the problem completely. I've worked around the issue by only starting SS when needed, and shutting it down otherwise, but would like to know if this is a known issue, or if it's somehow brought about by my design (though I'm not even sure how that could be)?

The two libraries may be trying to use the same timer.

You could try using the ServoTimer2 library. As its name suggests it uses Timer2 rather than Timer1.

...R

Cool, thanks. Is that the only difference between this library and the stock one?

kolosy:
Cool, thanks. Is that the only difference between this library and the stock one?

It’s a long time since I used it so I am not sure. It is very similar to the standard library.

…R