A little curiosity. A whole lot of making.Robotics, CNC & connected ideas
robodatech.
Arduino sample library

L298N Motor Driver 16

Control direction and speed for common two-wire DC motors.

Open in compiler →

Source code and build tools are available in the protected platform workspace.

How it works

Control DC motor direction and speed through an L298N-style driver.

  1. Connect IN1/IN2 to direction pins.
  2. Connect ENA/ENB to the PWM enable pin.
  3. Use an external motor power supply.
  4. Share GND between Arduino and motor driver.

Connections

PinConnect toNote
D7, D8L298N IN1 and IN2Controls motor direction.
D9L298N ENA/ENBControls motor speed. Share GND between motor supply and Arduino.

Good ideas start here.

Free robotics lessons, CNC build notes and product updates. Confirm your email to join. Unsubscribe anytime.