Raspberry Pi L298N motor controller

From wikiluntti
Revision as of 15:53, 12 November 2025 by Mol (talk | contribs) (→‎Python)

Introduction

RPi is powered by 5V, but on board it is reduced to GPIO 3.3V (GPIOs) and processors and memory (1.8V).

If needed to connect a 5V sensor to Pi, first reduce the 5V to 3.3V by using eg 2 resistors as voltage divider.

However, note that in the digital line the 1 bit is at __V.

L298N

Connections

Python

Install the GPIO package

sudo apt install python3-rpi.gpio

1

1

1

1

1

1

References