Use Soft pwm and update led_brightness example.