Hw 130 Motor Control Shield For Arduino Datasheet Apr 2026

| Shield Pin | Arduino Pin | Function | |------------|-------------|------------------------------| | ENA | D9 (PWM) | Enable channel A (PWM speed) | | IN1 | D8 | Direction A-1 | | IN2 | D7 | Direction A-2 | | IN3 | D6 | Direction B-1 | | IN4 | D5 | Direction B-2 | | ENB | D10 (PWM) | Enable channel B (PWM speed) | | +5V | 5V | Logic supply (from Arduino) | | GND | GND | Common ground | | VMS | (None) | External motor power (4.5–36V) |

void motorB(int speed, bool forward) analogWrite(ENB, constrain(speed, 0, 255)); if (forward) digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); else digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); Hw 130 Motor Control Shield For Arduino Datasheet

void loop() motorA(200, true); // forward 78% speed motorB(150, false); // reverse 59% speed delay(2000); stopMotors(); delay(1000); motorA(100, false); motorB(200, true); delay(2000); stopMotors(); delay(1000); | Shield Pin | Arduino Pin | Function

void motorA(int speed, bool forward) analogWrite(ENA, constrain(speed, 0, 255)); if (forward) digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); else digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); bool forward) analogWrite(ENB

void stopMotors() digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW);