http://arduino.cc/en/Tutorial/PWM
http://playground.arduino.cc/Code/PwmFrequency
sandersen_sleg:
4) Repeat measurement with input from static voltage from analog output (PWM)Maybe there is something I do not understand? How do i go about doing this?
Make one of the pin output PWM and connect analog port to that pin.