Alfarabi
Posts: 4
Joined: Fri Oct 12, 2018 7:24 am

How to control motor dc speed using pwm

Wed Nov 14, 2018 10:10 am

I have problem how to control motor dc with pwm. Usually I use arduino to control it, so I can control it by 0 - 255 speed of motor dc. I want to know how the code for python to control motor dc between 0-255 speed?

User avatar
B.Goode
Posts: 8045
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How to control motor dc speed using pwm

Wed Nov 14, 2018 10:18 am

The gpiozero python library module installed by default in recent versions of the Raspbian Stretch Operating System has support for generic DC motors, including speed control via pwm.

https://gpiozero.readthedocs.io/en/stab ... html#motor

Return to “Beginners”