Martin wrote:Why? Can L298N drive 4 motors?
Can it?... yessss... and no... It can only control two reversible outputs for DC motors, or 4 ON/OFF signals in the case of a stepper motor.
As for why it is sometimes shown with 4 motors... it is more a case of convenience/traction for the many 4-wheel drive chassis out there that have a motor on each wheel.
But in reality, since each side has the motors in parallel, the driver board is still only offering bi-directional control of two (sides), and any controlling software is "thinking" it has only two motors.
https://www.14core.com/wiring-driving-t … dc-motors/
You could even use 6 or 8 motors in this way as well (3 or 4 per side)... The real limitation is the current draw of the motors vs the current output of the driver (typically 2A max per channel/side for L298N)
Now... If you wanted to drive each of the 4 motors independently (and bi-directionally) as with mecanum/omni wheel rovers, then use two driver boards.
"And voila, which is French for.......'and then I found out.'" - Ready Player One