user51607: I tried to search a bout how to connect plolou motor with encoder to arduino mega and the motor control shield as in those pics  if any one knows how to connect those to each other please tell me 



user50469: A quick look on Pololu's website reveals that:
    Color   Function
  --------  --------------------------------------------
    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

Thus: Red goes to M1A and Black goes to M1B on the motor shield.
The remaining wires are for the encoder and go to Arduino pins.
Green goes to Arduino GND, Blue goes to 5V, Yellow and White go to the
digital i/O pins of your choice.
Note: Your motor shield has extra 5V and GND pins so you can connect the Blue and Green wires there.

51607: <p>I tried to search a bout how to connect plolou motor with encoder to arduino mega and the motor control shield as in those pics <a href="https://i.stack.imgur.com/iQKRs.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iQKRs.jpg" alt="enter image description here"></a> if any one knows how to connect those to each other please tell me </p>

<p><a href="https://i.stack.imgur.com/i6m5f.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i6m5f.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/UUB57.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UUB57.jpg" alt="enter image description here"></a></p>
 50469: <p>A quick look on Pololu's website reveals that:</p>

<pre><code>    Color   Function
  --------  --------------------------------------------
    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
</code></pre>

<p>Thus: Red goes to M1A and Black goes to M1B on the motor shield.
The remaining wires are for the encoder and go to Arduino pins.
Green goes to Arduino GND, Blue goes to 5V, Yellow and White go to the
digital i/O pins of your choice.</p>

<p>Note: Your motor shield has extra 5V and GND pins so you can connect the Blue and Green wires there.</p>
