school projekt

hey im a real beginner
we work since a few lessons with arduino uno
and i have to write a sketch in wich a ostilloskop is connected with the board and the numbers should go up and down for showing the analog output ( PWM )
but i dont really have a clue how to start
i just know that i have to use this analogWrite (pincount, PWM-number) ;
should i write a loop antil pwm number 255 and than go back down to pwm 0 for showing the curve?
is a for ... best for that??

thanks for your help
ps: sorry for my bad english

Analogue write is a misleading name. You do not get an analogue voltage out of the arduino but a pulse wave. The ratio between up and down time is what you set with the value.
In order to get a steady voltage out you have to have a filter.
I am wondering if you have understood correctly what you are supposed to do?

should i write a loop antil pwm number 255 and than go back down to pwm 0 for showing the curve?

Yes

is a for ... best for that??

Yes

See http://www.thebox.myzen.co.uk/Tutorial/PWM.html