the official Arduino example of pwm