diff --git a/examples/software pwm/pwm.go b/examples/software pwm/pwm.go index 24eafcf..51d56d0 100644 --- a/examples/software pwm/pwm.go +++ b/examples/software pwm/pwm.go @@ -10,6 +10,7 @@ Connect a LED with resistor from pin 19 to ground. package main import ( + "fmt" "os" "time" @@ -37,7 +38,7 @@ func main() { pwm.SetDutyCycle(i, 32) time.Sleep(time.Second/32) } - for i := uint32(32); i > 0; i-=3 { // decreasing brightness + for i := uint8(99); i > 0; i-=3 { // decreasing brightness pwm.SetDutyCyclePercentage(i) time.Sleep(time.Second/32) }