Here is a simple sketch to test the shield with two DC motors. This code does not require an external library, though using the standard AFMotor library is common if the shield is compatible (sometimes HW-130 requires custom code as below).
The shield uses specific Arduino pins to communicate with the onboard chips: Digital Pins 4, 7, 8, 12: Drive the motors via the shift register. PWM Pins (Speed Control): DC Motor #1 or Stepper #1. DC Motor #2 or Stepper #1. DC Motor #3 or Stepper #2. DC Motor #4 or Stepper #2. Servo Pins: (Servo 2) and (Servo 1). Unused Pins:
A simple application is controlling a 12V computer fan’s speed and direction. The L293D can handle up to 600 mA continuously, which is sufficient for most small cooling fans.
Connect:
No official HW‑130 schematic exists, but the circuit is a direct copy of the Adafruit V1 shield. The main functional blocks are:
Based on the pinout above, here is the truth table. To spin a motor, you set one direction pin HIGH and the other LOW . To brake, set both HIGH .
// Create motor objects on channels 1 and 2 AF_DCMotor motor1(1); AF_DCMotor motor2(2);
The is a powerful yet affordable expansion board that brings professional‑grade motor control to the Arduino ecosystem. Its L293D‑based design, combined with the 74HC595 shift register, delivers up to 4 DC motors or 2 stepper motors while occupying only a handful of I/O pins.