Updated analog to pwm examples to use new formulas.