An Open Source library for Arduino and the L298N driver module.
Wiring is essential for the library to work properly, so please be sure to connect your motors in the right way or the methods can doesn't work as expected.
Download this repository as a .zip file, or click this to download it directly. Then go to the Arduino IDE, once there go to Sketch -> Include library -> Add .ZIP Library
to have it ready to use.
Use #include <L298N.h>
to add the library to your project.
Method | Usage |
---|---|
L298N() |
Constructor. Put the parameters in this order, (int IN1, int IN2, int IN3, int IN4) |
moveBackwards() |
Moves the motors in backwards direction. |
moveForward() |
Moves the motors in forward direction. |
moveRight() |
Moves the motors to turn right. |
moveLeft() |
Moves the motors to turn left. |
stop() |
Stop all the motors. |
check() |
If the library is currently working returns 1 (Just for debugging purposes). |
Method | Usage |
---|---|
basic_movement | Moves the motors in all available directions. |
simple_check | Checks if the library is working without any wiring. |
bluetooth_movement | Use a Bluetooth App to move the motors. |
Pull requests are welcome, click here to contribute!. If you have any problem working with the library post it on Issues.
- Add PWM support.
- Translate README into Spanish.
- Add more examples.
Working on that.
Stars and forks are aprecciated ⭐