Do not power large motors via the Arduino's 5V pin. Separate Power: Connect an external battery (e.g., 7.4V7.4 cap V battery) to the EXT_PWR terminal.
void loop() // Motor A forward digitalWrite(motorAPin1, HIGH); digitalWrite(motorAPin2, LOW);
The HW-130 motor control shield is a popular accessory for Arduino boards that enables users to control DC motors, stepper motors, and other loads. Here's a brief overview of the shield's features and specifications:
are used for speed control (PWM). Digital Pins 9 and 10 control the servos. Analog Pins A0–A5 remain available for sensors. Software Guide
Check the EXT_PWR terminal polarity. Ensure the PWR jumper is configured correctly.
The HW-130 Motor Control Shield is not the only motor control shield available for Arduino, but it is one of the most popular and highly regarded. Here are a few key differences between the HW-130 and other popular motor control shields:
The HW-130 motor control shield is a versatile and easy-to-use accessory for Arduino projects involving motor control. Some example applications include:
Here's a simple example of using the HW-130 shield to control two DC motors:
(If helpful: related search suggestions loaded.)
// Linearization: map 0-255 to 30-255 to avoid dead zone speed = map(speed, 0, 255, 30, 255); analogWrite(ENA, constrain(speed, 0, 255));
AF_Stepper stepper(200, 2); // 200 steps/revolution, motor port #2
When to choose a different driver