You could also filter (low pass filter) the PWM signal with a .01uF cap and a 20K resistor and then read it as an analog voltage.
You could also filter (low pass filter) the PWM signal with a .01uF cap and a 20K resistor and then read it as an analog voltage.