Wiring my Pololu technology in order to program a motor

I have been assigned by my boss to use a TB6612FNG motor board and an Arduino MEGA 2560 Arduino to power a Using Magnetic Encoder connected to a motor. I am a computer science major and understand that I may need to download specific software for the encoder but I am struggling to find what that software is, if my parts are compatible, and what each wire on the encoder does. If it helps, my parts are:

TB6612FNG Dual Motor Driver Carrier
Arduino MEGA 2560 R3
Magnetic Encoder Pair Kit for Micro Metal Gearmotors, 12 CPR, 2.7-18V.

Please reach out if you have any advice.

Thank you.

Yes, all of those devices are compatible with each other.

We do not have any Arduino libraries for the TB6612FNG motor driver. However, you can find details about using the TB6612FNG motor driver in it’s datasheet, which can be found under the “Resources” tab of it’s product page. Adafruit’s TB6612FNG library would probably work with our board, but we have not tried it. Also, it looks like it just uses analogWrite() to generate the PWM signals (which is generally fine, but since it is a low-frequency PWM signal under 20kHz, it will be audible).

Similarly, we do not have any Arduino libraries for using the encoder, but you might consider using one of the libraries found on the “Reading Rotary Encoders” page of Arduino’s website. I generally recommend one that supports interrupts since those should be more accurate. You can find information about each pin on the encoder board under the “Pinout and installation” heading of the product page you linked to.