Dual vnh5019 shield and motor encoder

Hi,
I want to connect 2 motors with Pololu dual_vnh5019 shield motor. Can you help me please?

i have this: My motor has 6 pins:

Red motor power (connects to one motor terminal)
Black motor power (connects to the other motor terminal)
Green encoder GND Blue encoder Vcc (3.5 – 20 V)
Yellow encoder A output
White encoder B output
and my shield:

M1INA Motor 1 direction input A 
M1INB Motor 1 direction input B 
M1EN/DIAG Motor 1 enable input/fault output 
M2INA Motor 2 direction input A 
M2INB Motor 2 direction input B 
M1PWM Motor 1 speed input 
M2PWM Motor 2 speed input 
M2EN/DIAG Motor 2 enable input/fault output 
M1CS Motor 1 current sense output
M2CS Motor 2 current sense output

Hello.

On the Dual VNH5019 Motor Driver Shield for Arduino product page, there is a diagram which can be used as a reference for wiring up your motor.

In this case, you could wire up the red terminal from one of your motors to the M1A pin of the shield and its black wire to the M1B pin. Then the other motor’s red wire could go to the M2A pin of the shield and its black wire could go to the M2B pin. The remaining wires on your motor are for the encoder feedback module. If you wish to use the encoder feedback, you would need to make the connections to the Arduino directly, since the shield has no support for encoders.

You can see which pins on the Arduino are being used by the VNH5019 shield in the diagram under the “Shield Connections” section of the VNH5019 user’s guide, which you can find under the “Resources” tab of the shield’s product page. To connect your encoders, you should use pins that are not currently being used by the shield. This Arduino page on rotary encoders has a lot of useful information and code to help you get started.

-Josh