Driver - TB6612FNG Dual Motor Controller Driver

[title]TB6612FNG Dual Motor Controller Driver[/title]
This is a basic driver for the Toshiba TB6612FNG dual motor driver chip. It is available on small carrier board from places like Pololu:

Since I needed an easy way to control multiple motors on multiple driver boards this driver class also incorporates a light weight manager. You just set up the configurations for your motors, that is what OutputPorts and PWM are used, and pass them to the driver class. A different enable pin can be sued for each driver board or the same Enable may be shared among all boards.

You can select which motor to control by either its index or its name.

Only a single control method is included at this time, RunForMs, which runs a motor for a specified number of milliseconds. More control methods can be easily added though. This code is not optimized yet but is a good starting point.

Nice one!

Thanks for sharing

I might add the ability for the driver to make use of limit switches/sensors as it may be needed for my application. Is this something others may be interested in? If so I’ll add it to the code in any case.

The other change planned is to make the RunForMs method non-blocking. It will work as is for the current project so it may take a few days before i get it fixed up.