|
1 | 1 | # L293
|
2 |
| -Library for the control of bidirectional motors and not by the integrated circuit L293 |
3 | 2 |
|
4 |
| -Created by Giuseppe Masino, 28 may 2016 |
5 |
| -Author URL http://www.facebook.com/peppe.masino1 |
| 3 | +Compatible architecture: ALL |
| 4 | + |
| 5 | +##Description |
| 6 | + |
| 7 | +Library that allows to control bidirectional motors using the L293 IC |
| 8 | + |
| 9 | +##Sintax & short command reference |
| 10 | + |
| 11 | +- Creating an istance |
| 12 | + |
| 13 | + *L293(pwmPin, forwardPin, backPin);* |
| 14 | + *L293(pwmPin, forwardPin, backPin, speedOffset);* |
| 15 | + |
| 16 | + **L293** : the name of the object |
| 17 | + **pwmPin** : the pin that generate the pwm signal used to control the motor speed |
| 18 | + **forwardPin** : the digital pin used to tell the motor to go forward |
| 19 | + **backpin** : the digital pin used to tell the motor to go reverse |
| 20 | + **speedOffset** : the offset value applied to the pwm signal value, used to reduce the power given to a motor |
| 21 | + (e.g. in a robot two motors must rotate at the same speed, but one is more powerful than other) |
| 22 | + |
| 23 | +- Moving the motor |
| 24 | + |
| 25 | + ***L293.forward(speed);*** : makes the motor to go forward, **speed** can be a value between -255 and 255 |
| 26 | + |
| 27 | + ***L293.back(speed);*** : makes the motor to go reverse, **speed** can be a value between -255 and 255 |
| 28 | + |
| 29 | + ***L293.stop();*** : stops the motor |
| 30 | + |
| 31 | + ***L293.setSpeedOffset(speedOffset);*** : Used to set a new speed offset value after the creation of the istance |
| 32 | + |
| 33 | +##About the author & license info |
| 34 | + |
| 35 | +Created by ***Giuseppe Masino, 28 may 2016*** |
| 36 | +Author URL: http://www.facebook.com/peppe.masino1 |
6 | 37 |
|
7 | 38 | This library and the relative example files are released under the license
|
8 |
| -CreativeCommons Attribution-ShareAlike 4.0 International |
| 39 | +**CreativeCommons Attribution-ShareAlike 4.0 International |
9 | 40 |
|
10 |
| -License info: http://creativecommons.org/licenses/by-sa/4.0/ |
| 41 | +License info: http://creativecommons.org/licenses/by-sa/4.0/ |
0 commit comments