PWM support #78
Unanswered
o-alquimista
asked this question in
Q&A
Replies: 1 comment 2 replies
-
libgpiod does not deal with linux PWM, it's a wrapper around the linux GPIO uAPI exclusively. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
GPIO Zero has PWMOutputDevice, which I use to control the speed of a case fan for the Raspberry Pi 4:
How can I do the same with libgpiod?
gpioset
only takes 1 or 0 for value.I played with
gpioset --toggle <period> GPIO18=1
to try to emulate slower fan speed by switching it ON and OFF really fast, with periods ranging from 1ms to 100ms. While it did seem to slow down the fan, it didn't operate smoothly — I can hear it stutter (I don't know a better word to describe it).I suppose this is a complicated technique that takes a lot of tweaking. I got a reasonable 50% fan speed with
-t 50ms,10ms
. I'll continue experimenting.Beta Was this translation helpful? Give feedback.
All reactions