What a joke.
I am a beginner who wanted to build a 4WD robot using an Arduino UNO R3, a few DC motors, a servo motor and a ultrasonic sensor.
Since I wanted a 4WD robot I got some nice DC motors from servocity (127rpm) and I also got a very nice motor driver shield from pololu (MC33926 shield).
I tested all parts separately (one sketch for each robot key feature), the motor driver has no issues with two motors in each channel, the ultrasonic sensor was giving me the distances from left, front and right using a servo motor attached to pin 6 (yes PIN 6 because PIN 9 is used by the motor driver shield) but when I combined all the stuff together….bannnnggggg…after attaching the servo motor to pin 6 the 4 DC motors don't move….1 hour later after debugging and blaming every single part of the hardware I realized that the problem was the servo library.
I know pololu MC33926 Shield allows for PIN remapping and I understand how to do the hardware part => cut the connection from the underside of the board as indicated in their webiste and solder pins to run wires to new PINs. The main problem I have is that this also requires changes to the library because I need the pololu library stop using PINs 9 and 10 to control motor speeds because the servo library turns off PWM on these PINs. For what I understand the process of changing the library is not as easy as to replace PIN 9 and 10 with PINs 3 and 5 for reasons that I still don't understand (researching).
The other solution I believe is to use an Arduino Mega board for which the servo library does not affect PWM signal in PINs 9 and 10, is this correct?