

_0x0_webp.jpg)
_0x0_webp.jpg)
The L298N Motor Driver Module is a popular dual H-Bridge driver used for controlling DC motors and stepper motors. It allows you to drive two DC motors simultaneously, control their speed, and reverse their direction.
Key Features:
Pin Configuration:
+12V pin and ground to GND.OUT1, OUT2 (for motor A) and OUT3, OUT4 (for motor B).IN1, IN2, IN3, IN4 to a microcontroller (like Arduino) to control motor direction.ENA and ENB pins for speed control with PWM signals.
int motorA1 = 3; // IN1
int motorA2 = 4; // IN2
int enableA = 5; // ENA (PWM)
void setup() {
pinMode(motorA1, OUTPUT);
pinMode(motorA2, OUTPUT);
pinMode(enableA, OUTPUT);
}
void loop() {
digitalWrite(motorA1, HIGH);
digitalWrite(motorA2, LOW);
analogWrite(enableA, 128); // 50% speed
delay(2000);
digitalWrite(motorA1, LOW);
digitalWrite(motorA2, HIGH);
analogWrite(enableA, 128);
delay(2000);
}
Origin: China
Brand: Generic