Hey all,
I have to have my pins 9 and 10 switched to other pins. I am trying to operate a servo alongside the motor controller and the servo causes my arduino to no longer use pins 9 and 10 as pwm. Therefore the only way for me to run this project is to reassign the pins. I seem to have figured out how to change every pin but pin 9 and 10, those are ‘special’. Please help.
Again that is for the Dual MC33926 and the arduino is an arduino uno with the atmega328p
Hello.
Pins 9 and 10 are the Timer 1 PWM pins, and since the Arduino Servo library also uses Timer 1 to generate the servo signals, you must move either the motor drivers or the servos to a different timer in order to get them to work together. We have some example code that demonstrates how to control a servo with Timer 2 in the “Controlling a servo” section of the Pololu Zumo Shield for Arduino User’s Guide. Alternatively, you could try to rewrite the dual MC33926 shield library to use a different timer.
- Jeremy