1
0
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:
Demo User 2016-04-03 02:16:16 +00:00 committed by deadprogram
parent 296e2c3549
commit aaa7497ca1

View File

@ -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)))
}