Added code for setting the pwm duty cycle using the adc.