Hw 130 Motor Control Shield For Arduino Datasheet -

: Dedicated to PWM speed control for the four DC motor channels. Digital Pin 4 : Shift Register Clock (CLK). Digital Pin 7 : Shift Register Enable line. Digital Pin 8 : Shift Register Data line (SER). Digital Pin 12 : Shift Register Latch (STRB).

The shield simplifies wiring by plugging directly into the Arduino headers. hw 130 motor control shield for arduino datasheet

AF_Stepper stepper1(48, 1); // 48 steps per revolution, motor port #1 (M1+M2) : Dedicated to PWM speed control for the

Used for PWM (Pulse Width Modulation) speed control of DC motors. Digital Pin 8 : Shift Register Data line (SER)

#include AF_DCMotor motor1(1); // Create motor object on Channel 1 void setup() motor1.setSpeed(200); // Set speed (0-255) motor1.run(RELEASE); // Stop motor void loop() motor1.run(FORWARD); // Turn forward delay(1000); motor1.run(BACKWARD); // Turn backward delay(1000); motor1.run(RELEASE); // Stop delay(1000); Use code with caution. Cost-Effective: Extremely cheap for the functionality.

| Motor | Direction Pin (Arduino) | PWM Speed Pin (Arduino) | |-------|------------------------|-------------------------| | M1 | D12 | D5 | | M2 | D11 | D6 | | M3 | D8 | D9 | | M4 | D7 | D10 |

To drive 4 unidirectional motors (e.g., vibration motors or fans):