Control servo with potentiometer

Hi, I have to move a servo motor that has a movement of 180 ° with an Arduino and a potentiometer, but I must not use the libraries servo.h, I have to write all the code in full, is a project for an examination of 'universities. someone can give me the code and maybe comment on it? is the first time that I use Arduino and prof. not told us many things. Please help me ...!!! Sorry for my English but I'm Italian and I'm using the Google translator to write. Sorry. ;)

There is plenty of code here and on the playground. Google terms PPM, delayMicros

I have to write all the code in full, is a project for an examination of 'universities. someone can give me the code and maybe comment on it?

I have to write all the code in full

So, no.

is the first time that I use Arduino and prof. not told us many things.

Then you should report the prof. to the university officials for not properly preparing you for the assignments you are given.

As someone who has taken and taught university classes in the recent past I can say that this is dreadful behavior. Why take the class? Asking for this much "help" (ie "do my homework for me") is not a good idea. It hurts you (I presume your in university to lean?!) and it hurts your classmates (if the course is graded on a curve) and it reflects poorly on your university, which in turn hurts you more.

I've heard all kinds o excuses why students (and peers!) "can't" do their work. They are rarely legitimate and the ones that are special arrangements can be me officially.

Sorry for my English but I'm Italian and I'm using the Google translator to write. Sorry.

Maybe your fellow countrymen? http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=italiano

I presume your in university to lean?!

Not typically what people go to university for, but true in OP’s case.

The University of Pisa is a venerable institution