i am connecting 2 brushless dc motors to a raspberry pi B and need help on connecting the correct pins . I saw a video on how to connect one motor but don’t know which ones to use to connect the second one . I need to connect 3 pins via L298N motor driver i need a in1 in2 and ground pin . I got the ground pin but don’t know which ones to use for the other . I saw a tutorial but only for connecting one and in that video he connected it to the GPIO 23 and 24 which other GPIO pins can i use for the second one ?


1 Answer 1


I don't think it is a good idea to drive the mototrs directly form the GPIO pins. It i s better tu use line direvers, Motor control hat etc. Because motors could draw more current when they startup and create problems.

This is being said. What pins you'd connect them depends on the program. Please refer to them and see which GPIO pins you need to connect them. As a rule of thumb + polarity will be connected to GPIO pins and - terminal will be common and will be attached one of the GND pins on the GPIO.

  • L298N is the poster's driver. "This" (half of your answer) did not need to be said.
    – Abel
    Jan 15, 2022 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.