Hello @coyotlgw,
My non scientific answers based on the experiments I made to control the servos of my RPB-202 robot:
-
Even though you might not run the servos and motors concurrently, my observations is that the motors will not behave as expected when calling
.setSpeeds()method. You may try to detach the servos before running the motors but I haven’t tried it since I wanted to be able to run the motors concurrently with the servos (object tracking with the camera pan-tilt while moving) and the modification to the servo library is quite easy (below). -
Yes, you can modify the library and save it in a different folder of your libraries folder. I renamed mine ServoT3 and renamed the other files in the src and avr directories as well. I also updated the library.properties file so it shows up in the Arduino Library as well as the keywords.txt file to get proper syntax highlighting (see attached zip file). To use it, I just have to
#include <ServoT3.h>in my sketch and it runs well without interference with the motors*.
Hope this helps.
*I did have issues with my encoder readings with this setup though (missing encoder counts). I haven’t had the time to investigate it yet. I am thinking of using a second Arduino to control the servos. This second Arduino would receive its commands via I2C either from the Raspberry Pi or from the A-Star. I have yet to try this.
Best regards.
ServoT3.zip (8.4 KB)
