Build a robot – Part 7: Developing a library for DRV8871 motor driver

After mounting and assembling the two DRV8871 driver boards it as time to write some lines of code to get the things moving. At first I wrote a class to control one single motor for testing purposes but also to start with a modular way of coding. The class library DRV8871 is able to drive the motor in forward and backward direction with an optional acceleration. Currently in progress is the class library DRV8871Dual. Thei lib is able to control two dc motors synchronously which is essentially for the tank style robot base. At the moment, the dual operation is not able to use the acceleration feature due to synchronization problems. I will solve this problem in future.

The current status of the code can be found on Github:

Leave a Reply

Your email address will not be published. Required fields are marked *