Arduino UNO with TB6612FNG motor driver

I'm just starting with arduino so still trying to learn code. Can any one help me find a sketch for controlling a TB6612FNG motor driver as well as a hookup diagram. Thanks in advance.

you can try this library
or this code over here

as for how to connect it to your arduino (page 7) its a diagram basically you use 3 pins (from your arduino) to driver one channel of the driver 2 pins for direction control , and one (pwm capable) pin for speed control and you connect your motors between pins A01-A02 and B01-B02

hope this help