https://github.com/elijas/arduino-motor-control-library
Arduino library that allows DC motors to gradually reach their new power level, within allowed PWM ranges
https://github.com/elijas/arduino-motor-control-library
analogwrite arduino arduino-library c-plus-plus controller motor pwm pwm-driver
Last synced: about 2 months ago
JSON representation
Arduino library that allows DC motors to gradually reach their new power level, within allowed PWM ranges
- Host: GitHub
- URL: https://github.com/elijas/arduino-motor-control-library
- Owner: Elijas
- License: mit
- Created: 2015-01-21T12:42:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-01T04:35:51.000Z (over 5 years ago)
- Last Synced: 2025-08-19T16:24:27.958Z (about 2 months ago)
- Topics: analogwrite, arduino, arduino-library, c-plus-plus, controller, motor, pwm, pwm-driver
- Language: C++
- Homepage:
- Size: 78.1 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Description:
This is an arduino library that allows the power given to motors increase/decrease gradually (and not instantaneously as with analogWrite() function which this library is meant to replace).
# Features:
- Lower and upper power limits (e.g. for motors that are able spin only when PWM duty cycle is above some threshold, (i.e. when the value is big enough in analogWrite(pin,value)))
- Adjustable rate of power change (by changing step size and/or update delay)
- Any number of motors (currently two are supported, modify header to allow for more)# Usage:
```
Timer timer;
Motor myMotor(0, 2, 3, 0, 255, 1, 30, &timer);myMotor.set(255)
```
(see example code for details)(NB: It is necessary for [Timer](http://playground.arduino.cc/Code/Timer) library to be [added](http://arduino.cc/en/Guide/Libraries) to arduino)