Hello,
I’ve connected my RPI ZERO with the DRV8835 module and two motors which are called ( 136:1 SUB-MICRO PLASTIC PLANETARY GEARMOTOR 6DX19L MM ), I also have other size like the 26:1 ones.
I’m using the code provided in Polulu’s github for DRV8835 module:
https://github.com/pololu/drv8835-motor-driver-rpi
The code I’m running is example.py
which can be found here in the same github:
https://github.com/pololu/drv8835-motor-driver-rpi/blob/master/example.py
The problem is that I can’t fully control the two motors (forward/backward).
When executing this line: motors.setSpeeds(0, -100)
, both motors drive forward which is very weird, and also the driving isn’t in straight path - which I’m trying to solve by tweaking the parameters that are responsible for driving the wheels straight, for now this fails and drives in a circle.
This is what happens when checking all the parameters: (very weird)
- motors.setSpeeds(0,100) - left forward
- motors.setSpeeds(0,-100) - both forward
- motors.setSpeeds(100,0) - left forward
- motors.setSpeeds(-100,0) - right backward
- motors.setSpeeds(-100,100) - left forward, right backward
- motors.setSpeeds(-100,-100) - both forward
- motors.setSpeeds(100,-100) - both forward
- motors.setSpeeds(100,100) - right backward, left forward
Any ideas why is this happening? Should I try different modules - if yes which modules should I try?