Where to start with the code for DC Motor robot


I recently ordered 4 DC motors and 2 Tb6612FNG drivers. While I wait for them to arrive, I thought I’d get ahead and look up some of the code and I’m kinda confused. Where can I start? I saw one tutorial from Instructables and from Sparkfun, and they both didn’t have the same syntax to control the motors. Could someone point out where I could start the coding process?



We do not have any specific example code for that driver, so my recommendation is to look over the datasheet, which is available on the product page under the resources tab, to learn how the driver works and what kind of control signals it needs. After you do that, you could look around online for some examples or a library, but the TB6612FNG has a somewhat atypical control interface, so code written for a different driver might not be usable without modifications. If you do find something, or if you make your own test code, you can post it or a link to it here and we can take a look to see if it looks reasonable.

- Patrick