Need Help Writing Servo Functions For Zumo [Solved]

I am working on a Zumo Robot Project using an Uno.

The problem is that the motor library uses Timer1 and can not be changed.
The buzzer library uses Timer2.
The servo program below also uses timer2.

Based on the program below I want to add an AttachServo() function and a DetachServo() function similar to the ones in the servo.h library.

My goal is to attach the servo, use it, the detach it, thus allowing the buzzer to work while the servo is not being used.

I do not have enough knowledge of the Arduino architecture to accomplish this myself.

Your help is greatly appreciated and please keep your replies on topic

The partial solution to this problem can be found here:

And here:

The ServoTimer2 library utilizes Timer2 for servo control but does not solve the problem of having two interrupt vectors for Timer2 if you want to use the buzzer and a servo together but not at the same time.

I hope to post a solution to that problem in the near future…

Hello, SRS.

You posted a similar question here. I responded to it there.

- Jeremy