Controlling a motor with an encoder with an Arduino

I ordered this motor:

uxcell DC 12V 7RPM 50Kg.cm Self-Locking Worm Gear Motor with Encoder and Cable, High Torque Speed Reduction Motor

https://www.amazon.com/gp/product/B078J521TG

I have an Arduino Uno and a 12 Volt battery supply from 8 AA batteries from my previous project.


I found a few tutorials:

Tutorial for DC Gear Motor With Encoder

https://www.instructables.com/id/Tutorial-for-DC-Gear-Motor-With-Encoder/

Tutorial for Monster Motor Shield VNH2SP30

https://www.instructables.com/id/Monster-Motor-Shield-VNH2SP30/

This new motor is slower but has more torque than the motors I used in my last attempt at an autonomous robot.

The older motors had

Torque: 30 N*cm

According to Wolfram Alpha that’s:

3.059 kgf cm kilogram-force centimeters.

This new motor has 50Kg.cm.

I ordered a few items on Ebay:

NEW MEGA 2560 R3 Development Board CH340G ATMEGA 2560 Kit USB Cable For Arduino

1pcs Dual VNH2SP30 Stepper Motor Driver Module Monster Moto Shield Replace L298N

3/4/5/6/12mm Rigid Flange Coupling Motor Guide Shaft Coupler Metal Bearing Seat( 142461587108 )

Specification: 8mm

Quantity: 4