mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-09 19:29:27 +08:00
Increased PWM frequency
This commit is contained in:
parent
296e2c3549
commit
aaa7497ca1
@ -293,7 +293,7 @@ func (b *Adaptor) pwmWrite(pin string, val byte) (err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
period := 500000.0
|
||||
period := 50000.0
|
||||
duty := gobot.FromScale(float64(val), 0, 255.0)
|
||||
return b.pwmPins[i].pwmWrite(strconv.Itoa(int(period)), strconv.Itoa(int(period*duty)))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user