-
Notifications
You must be signed in to change notification settings - Fork 0
Home
L298 is an easy to use Arduino library for driving motors using the L298 Dual Full-Bridge Driver.
It can be used with any L298N, L298HN or L298P IC.
The main features of this library includes non blocking code, code stripping on demand and extensive Unit Tests using the ArduinoUnit library.
This library has been creating having the user's comfort in mind...
- Non blocking code
- Unit-tested
- Adjustable code
- Optional Debug messages
-
Basic
- Adjustable speed
- Coasting (Free Running Motor Stop)
- Brake (Fast motor stop)
- Motor status indicators
- Running
- Direction
- Accelerating
- Decelerating
- Braking
- Coasting
- Brake On
- Digital Limits
- Analog limits
- Over-current
-
Advanced
- Acceleration
- Deceleration
- Current measurements
- Position feedback
- Limits
- Collision detection (digital)
- Motor position boundaries (analog)
- Maximum current
Download and unzip L298
folder in arduino's Library
folder
All time-dependent functions are written without using the delay() function
With a lot of functionlaity, comes a lot of overhead. -- Unknown programmer
Since having a ton of functionality available on your disposal sounds great, on the contrary unecessary code adds up to limited resources.
The user has the ability to strip out not needed code by editing the L298_config.h
header file.
// comment out the following line to disable "ACCELERATION" functions
#define ACCELERATION_FUNCTIONS
// comment out the following line to disable "CURRENT" functions
#define CURRENT_FUNCTIONS
// comment out the following line to disable "LIMITING" functions
#define LIMITING_FUNCTIONS
// comment out the following line to disable "POSITION" functions
#define POSITION_FUNCTIONS
Feel free to fork this repository, make changes and create pull requests.