Anyone have some example of compass sensor source code with servo motor

I'm trying to develop a robot consist of compass sensor that interface with servo motor. I try to program so that it will turn exactly 90 degree on certain condition. Did anyone of u have the example of compass sensor interface with the servo motor?

compass sensor that interface with servo motor.

It's much easier to interface a compass sensor with the Arduino, and also interface a servo with the same Arduino.
When you look at the problem this way, the task becomes much simpler.

note that. will try