I am using Arduino Uno. I am using xBee Sparkfun shield (WRL-12847) and configuring xBee s1 with SoftwareSerial pins 2,3. I also have a MPU9150 connected to Analog 4,5 (SDA,SCL), using Richards-tech RTIMUlib-Arduino. I am also trying to control two servos at PWM pins 9,10. I have experienced odd behavior when xBee is reading in data concerning the Servos. at a 9600 Baud rate for the xBees, I experience (every 4 seconds) an odd jerking of the servos that I cannot seem to pinpoint the issue.
I have seen online that there may be an issue using SoftwareSerial in conjunction with Servos in that it may disable interrupts for a brief period of time. Is this still the case? This was for an older version I believe but so far is my only lead.
Does anyone have successful use cases of xBee and servo configurations that I can reference and perhaps seek guidance from? Advice?
Thanks!!!
The error is happening with a very small low power servo powered at 5v direct off of Arduino. The true system will be powered by separate 12v battery. (4 servos total, 2 control signals.) Servo has no issues when xBee is not receiving data.
Servo has no issues when xBee is not receiving data.
I doubt that a radio connected to the Arduino receiving data is causing the problem. I suspect that the radio sending data to the Arduino is what is causing the problem, because you are using SoftwareSerial. Get an Arduino with multiple hardware serial ports, and watch your problems disappear.