official example to show how software pwm works