SoftwareSerial and Servos

A friend of mine asked me yesterday, if SoftwareSerial.h still conflicts with Servo.h. He's thinking about developing something involving a GSM module and some Servos. I remember that used to be an issue, but that was some years ago. I don't know the current state of affairs regarding this. Tried to google it, but all that I've got were old stuff.

It does. Try using the ServoTimer2 library

...R

Even ServoTimer2 continued to cause a conflict for me with SoftwareSerial, so I switched to Servo2 library and that solved it for me. My experience and some instructions here.

I believe the Servo2 library can only control 2 (?) servos.

...R

jeferson_lucio:
A friend of mine asked me yesterday, if SoftwareSerial.h still conflicts with Servo.h. He's thinking about developing something involving a GSM module and some Servos. I remember that used to be an issue, but that was some years ago. I don't know the current state of affairs regarding this. Tried to google it, but all that I've got were old stuff.

Depends on which board. On the Mega Servo doesn't use timer1 until its done with the other 16 bit timers
(there are 3 others). However on the Mega you have enough hardware serial ports that SoftwareSerial is
unlikely to ever be needed....

On the Uno there is only one 16 bit timer, which is why there's a conflict because both those libraries really
want a wide range timer.

Robin2:
I believe the Servo2 library can only control 2 (?) servos.

...R

Yes, I think you are right about that. Good enough for me, since I only use one servo, but I guess it's not a good solution for people building little robots or whatever.

We are talking about the Nano/Uno here. At least these are the boards there I saw on his workbench.

I know Servo.h works fine when you have Serial1 (Micro and Micro Pro) or Serial1, Serial2 and Serial3 (Mega), cuz I use Serial1 on a Micro with 3 servos connected to it, and I don't have to detach() any of them in order to read the serial buffer, nor I have to stop listening to it in order to drive the servos. Works just fine, receiving data and applying to the servos.

Another option is to use a different "software serial" library such as neoSWserial or altSoftSerial

...R