Raspberry Pi Motor Shield is a Raspberry Pi based HAT used for controlling 2 stepper motors or 4 DC motors that lets you drive motors, controlling the speed and direction of each one independently. All you need is just connecting the Motor Shield, Raspberry Pi, and combined with the desired programming code, now it’s all ready to start your robotic exploration: line tracking, obstacle avoidance, distance measurement, maze solver robot, video monitoring, WiFi/Bluetooth/ZigBee/Infrared remote control, etc. Mounting a camera on the top makes it a surveillance-based robot car.
Motor shield HAT is designed to help you control your Raspberry Pi based Robot. This board lets you control up to 4 DC motors. It includes direction indicator LEDs to help you configure your motor output and connectors designed for plugging in IR and ultrasonic sensor modules to tell your robot about its environment. Enabled with IR Sensor and the Ultrasonic sensor, it becomes a perfect component for the object detection/avoidance, wall-following or light/line following robots.
The board is designed specifically for the Raspberry Pi 2, Raspberry Pi 3 and Raspberry Pi 3 model B+. Based around the L293D IC it is capable of driving 4 DC motors or 2 stepper motors. The L293D is a dual full bridge driver that can output up to 1A per bridge with supply voltage up to 24V.
Read more here : Control Your Stepper & DC Motors with Raspberry Pi Motor Shield