Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

2 DRV8835 Arduino drivers for 4 DC motors

Hi, I have 2 DRV8835 drivers and would like to to control 4 motors.
(I know that this topic has been discussed earlier, but no clear solution). Could the Arduino library DRV8835 be modified so that the 4 pins PWM and DIR could be configured to use different pins ?
The defaults 7,8,9,10 cannot be used on the second DRV8835, because I want to control 4 motors independently.
I also have MAX14870 drivers and on that library pins can be configured.
I am using the new Arduino nano RP2040 boards and these have the necessary PWM pins available.

Hello.

Unfortunately, our DRV8835 shield library does not have a constructor that allows you to reconfigure the pins, but it should be possible to modify the library to add that. The MAX14870 shield library would be a good reference for guiding you through that.

- Patrick

Of course I can modify DRV8835 library myseff, but I ask that somebody in Pololu would do it so that it benefits all your DRV8835 customers !

Earlier today we updated our DRV8835 library on GitHub to include support for an alternate constructor. Keep in mind it might take a while (maybe a day or so) for the update to show up in the Arduino Library Manager.

Please let us know how it works for you or if you have any problems.

- Patrick

Thank you for this library update, I tested it and seems to work as expected !
Thanks !!