#FUNCTIONS OF PINS L298N MOTOR DRIVER DRIVER#
The Python Script for Interfacing L298N Motor Driver Module with Raspberry Pi is given below.
The rest of the job is done by the Python Script. In order to do that, connect the ENA pin of L298N to Physical Pin 22 (GPIO25) of Raspberry Pi.Ĭoming to the Inputs of the Motor, connect the IN1 and IN2 of L298N Module to Physical Pins 16 and 18 (GPIO23 and GPIO24). Now, since we are controlling a single DC Motor, we need to use a single channel of the L298N. Then, make the GND terminals of Raspberry Pi and L298N Motor Driver Module common (connect them together). First connect 12V Power Supply to L298N Motor Driver Module. The design of the Raspberry Pi L298N Motor Driver Interface Circuit is very simple.