Simple servo control on pwm channel12

ok. I am building a robotics project for my high school sophmore science fair, I have all the materials and have my arduino decemilia board and shield set up, the chassis is built and my servo is here. but…

I dont know c, the closest thing i know is c++, so most of the larger & more complex codes are compleatly lost on me.

how do I control a servo over pwm didgital channel 12 on theboard? simple commands like center, left 45, right 45 ect. ect.

code in C is helpful as long as it is simple, I will be incorperating it into my project so please leave details for sighting the code properly if possible,

thanks a bunch
~monk

here yo go: http://www.arduino.cc/playground/ComponentLib/Servotimer1

or just go to the playground and look up hardware interface, and servos

sorry, never mind this post

Im sorry, im just compleatly lost, even tho the code is well commented, im compleatly bewildered

ok, go here :

http://www.arduino.cc/playground/Main/InterfacingWithHardware#Output

and scroll down to servos, and click any link that you need, it will tell you if u need chips, or anything! hope thats a little more helpful...

There is a link here: http://blog.thestem.ca/archives/74 to a simple sketch that controls a typical hobby servo connected to a digital output using a potentiometer connected to an analog input. it may be a good place to start

Try this: http://todbot.com/arduino/sketches/ServoSerialBetter/ServoSerialBetter.pde

Basically, what you do is turn a pin to HIGH wait for a very short amount of time, and turn it back off.

Try this: http://todbot.com/arduino/sketches/ServoSerialBetter/ServoSerialBetter.pde

Basically, what you do is turn a pin to HIGH wait for a very short amount of time, and turn it back off.

..and wait so that there is a 20 millisecond gap between pulses

The code dra linked has the advantage that additional processing is being done during the 20ms period between pulses.