Servo and serial1,2,3 or software serial interference

hello,

I'm having trouble using any serial (except serial0 (aka serial)) or software serial with the servo library.

software Serial:
At first I was using an arduino uno with software serial to communicate with adafruits' ultimate GPS breakout board. Also I have an ESC hooked up to control an RC-motor. whenever the software serial received something the RC motor would spin. This is not desirable...

hardware serial:
After having problems with software serial on the arduino uno I switched to an arduino mega, thinking another hardware serial would help. Although the interference on the esc is not as dramatic it still occurs every 20 to 25 seconds.

After some digging I found that this problem is common, but solutions are not very easy to find, at least not for my project.
Since i'm also using a dragino shield (for LoRa) and an RF24 (for RC), I do not have much pins available at least not the pins I could find in common solutions like PWMservo or altsoftserial.

any suggestions?
Thanks in advance.

Probably you wrote too much blocking code, that prevents the servo signal generator from working properly.

If your servo library does not use hardware for the output signal generation, look for a better library or a dedicated servo shield.

peetje375:
hardware serial:
After having problems with software serial on the arduino uno I switched to an arduino mega, thinking another hardware serial would help. Although the interference on the esc is not as dramatic it still occurs every 20 to 25 seconds.

I presume you are not using SoftwareSerial on the Mega.

Please post the program that is causing a problem on the Mega.

A short YouTube video that illustrates the interference would also be helpful.

...R