resolve analogWrite issue and add a pwm example