This dual bidirectional motor driver is based on the very popular L298 Dual H-Bridge Motor Driver IC. This module will allow you to easily and independently control two motors of up to 2A each in both directions.
It is ideal for robotic applications and well suited for connection to a microcontroller requiring just a couple of control lines per motor.
In this tutorial you will learn how to use it with Arduino uno to control two dc motors.
For this project you will need:
The connections are pretty easy!
Here's the code, embedded using codebender!
Try downloading the codebender plugin and clicking on the Run on Arduino button to program your Arduino with this sketch. And that's it, you've programmed your Arduino board!
You can keep playing with that by clicking the "Edit" button and start making your own modifications to the code. For example try to combine parts of code to move both motors simultaneously.
Try to use analogWrite(pin, PWM value) instead digitalWrite(pin, HIGH/LOW) to control the speed of motors!
You have successfully completed one more Arduino "How to" tutorial and you learned how to use the L298 motor driver IC module to control two dc motors with the Arduino uno board.
I hope you liked this, let me know in the comments.
There will be more of them, so make sure to click Follow button!