Skip to content

Commit 89c937a

Browse files
author
Giuseppe Masino
committed
Committed release v3.0.0
1 parent 752e484 commit 89c937a

File tree

8 files changed

+225
-129
lines changed

8 files changed

+225
-129
lines changed

Changelog.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ symbols caption:
44
> = changed/fixed
55
> \* coming in a future release
66
7+
Changelog v3.0.0
8+
9+
> = Updated **README.md**
10+
> = Updated **keywords.txt**
11+
> = Renamed the class **L293\_standalone** in **L293**
12+
> = Rewrited the class **L293** and **L293\_standalone**
13+
> = Renamed the method **setSpeedOffset()** in **setPWMOffset()**
14+
> = Fixed a bug about the timing when switching a motor from the forward mode to the reverse mode and viceversa
15+
>
16+
> \+ Added an overload for the **forward(speed)** and the **back(speed)** method described in README.md
17+
> \+ Added the method getDirection()
18+
> \+ Added the method getPWMDC()
19+
> \+ Added the method getRawPWMDC()
20+
> \+ Added the method forceStop(handleTime)
21+
722
Changelog v2.0.0
823

924
> = Made updates and corrected some mistakes in **README.md**

LICENSE.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#LICENSE
22

3-
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/HackerInside0/Arduino_L293.git" property="cc:attributionName" rel="cc:attributionURL">Giuseppe Masino</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc="http://creativecommons.org/ns#" href="https://facebook.com/peppe.masino1" rel="cc:morePermissions">https://facebook.com/peppe.masino1</a>.
3+
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
4+
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
5+
</a>
6+
<br />
7+
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">The L293 Library</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/HackerInside0/Arduino_L293" property="cc:attributionName" rel="cc:attributionURL">Giuseppe Masino</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a> and also under the following terms:
48

5-
The full license text can be found here: https://creativecommons.org/licenses/by-sa/4.0/legalcode
9+
The softwares, source files, schematics and all other material are provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular scope and noninfringement.
10+
11+
In no event shall me and/or other peopole that holds the rights and/or are implied in the creation and distribution of the above mentioned things be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising form, out of or in connection with the above mentioned things or the use or other dealings in it.
12+
13+
The above copyright notice and this permission notice shall accompany and/or be included ( depending on the type of work ) in all the derived works from mine, as addendum to compliance with the provisions above.
14+
15+
If you need permissions that are beyond the scope of this license, you can ask to me through this facebook page <a xmlns:cc="http://creativecommons.org/ns#" href="https://www.facebook.com/dev.hackerinside/" rel="cc:morePermissions">https://www.facebook.com/dev.hackerinside/</a>
16+
17+
Relatively to the Creative Commons Attribution-ShareAlike 4.0 International License:
18+
A summary the license can be found here: http://creativecommons.org/licenses/by-sa/4.0/
19+
Otherwise, the full license text can be found here: https://creativecommons.org/licenses/by-sa/4.0/legalcode

README.md

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,59 @@ Compatible architecture: ALL
66

77
Library that allows to control bidirectional motors using the L293 IC in two different hardware configurations:
88

9-
- L293_standalone
10-
- L293_twoWire
9+
- standalone
10+
- twoWire
1111

12-
### L293_standalone configuration ###
12+
### standalone configuration ###
1313

14-
This configuration in intended for use with a standalone L293 IC, using 3 wires for each motor to control ( exclunding the power supply ).
14+
This configuration in intended for use with a standalone L293 IC and breakout boards that expose the ENABLE pin and the two INPUTS, using 3 wires for each motor to control ( excluding the power supply ).
1515
The circuit must be like this:
1616
![L293_standalone HW configuration](https://github.com/HackerInside0/Arduino_L293/blob/master/extras/L293_standalone-HW-conf.png)
1717

18-
### L293_twoWire configuration ###
18+
### twoWire configuration ###
1919

2020
This configuration is intended for use with a circuit like this:
2121
![L293_twoWire HW configuration](https://github.com/HackerInside0/Arduino_L293/blob/master/extras/L293_twoWire-HW-conf.png)
2222

2323
Where only two wires are used to control the motor: the PWM signal and the direction signal ( excluding the power supply )
2424

2525
## Sintax & short command reference ##
26-
### Reference for the L293_standalone configuration ###
26+
### Common reference ###
27+
28+
- Moving the motor
29+
30+
***motor.forward(speed);*** : makes the motor to go forward, **speed** can be a value beetween 0 and 255
31+
***motor.forward();*** : makes the motor to go forward without modifing the speed
32+
***motor.back(speed);*** : makes the motor to go reverse, **speed** can be a value beetween 0 and 255
33+
***motor.back();*** : makes the motor to go reverse without modifing the speed
34+
***motor.stop();*** : stops the motor
35+
***motor.setPWMOffset(speedOffset);*** : sets the offset value applied to the pwm signal value, **speedOffset** can be a value beetween -255 and 255
36+
***motor.getRawPWMDC();*** : returns the current speed value whitout appling the speed offset
37+
***motor.getPWMDC();*** : returns the real current speed value
38+
***motor.getDirection();*** : return an integer representing the status of the motor:
39+
- 0 : the motor is going forward
40+
- 1 : the motor is going reverse
41+
- 3 : the motor is braked
42+
- 4 : unknown status
43+
44+
### Reference for the standalone configuration only ###
2745

2846
- Creating an istance
2947

30-
*L293_standalone motor(pwmPin, forwardPin, backPin);*
31-
*L293_standalone motor(pwmPin, forwardPin, backPin, speedOffset);*
48+
*L293 motor(pwmPin, forwardPin, backPin);*
49+
*L293 motor(pwmPin, forwardPin, backPin, speedOffset);*
3250

3351
**motor** : the name of the object
3452
**pwmPin** : the pin that generate the pwm signal used to control the motor speed
3553
**forwardPin** : the digital pin used to tell the motor to go forward
3654
**backpin** : the digital pin used to tell the motor to go reverse
37-
**speedOffset** : the offset value applied to the pwm signal value, used to reduce the power given to a motor (can be a value beetween -255 and 255)
38-
(e.g. in a robot two motors must rotate at the same speed, but one is more powerful than other)
55+
**speedOffset** : the offset value applied to the pwm signal value, used to reduce the power given to a motor (can be a value beetween -255 and 255) (e.g. in a robot two motors must rotate at the same speed, but one is more powerful than other)
56+
57+
- Moving the motor
58+
59+
**motor.forceStop(handlingTime);** : stops the motor electically braking it, **handlingTime** is the time in milliseconds during which the motor is braked, the recommended value is 100
3960

40-
### Reference for the L293_twoWire configuration ###
61+
### Reference for the L293_twoWire configuration only ###
4162

4263
- Creating an istance
4364

@@ -50,18 +71,22 @@ Where only two wires are used to control the motor: the PWM signal and the direc
5071
**speedOffset** : the offset value applied to the pwm signal value, used to reduce the power given to a motor (can be a value beetween -255 and 255)
5172
(e.g. in a robot two motors must rotate at the same speed, but one is more powerful than other)
5273

53-
### Common reference ###
5474

55-
- Moving the motor
56-
57-
***L293.forward(speed);*** : makes the motor to go forward, **speed** can be a value beetween 0 and 255
58-
***L293.back(speed);*** : makes the motor to go reverse, **speed** can be a value beetween 0 and 255
59-
***L293.stop();*** : stops the motor
60-
***L293.setSpeedOffset(speedOffset);*** : Used to set a new speed offset value after the creation of the istance, **speedOffset** can be a value beetween -255 and 255
6175

6276
## About the author & license info
6377

64-
Created by ***Giuseppe Masino, 28 may 2016***
65-
Author URL: http://www.facebook.com/peppe.masino1
78+
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
79+
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
80+
</a>
81+
<br />
82+
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">The L293 Library</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/HackerInside0/Arduino_L293" property="cc:attributionName" rel="cc:attributionURL">Giuseppe Masino</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a> and also under the following terms:
83+
84+
The softwares, source files, schematics and all other material are provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular scope and noninfringement.
85+
86+
In no event shall me and/or other peopole that holds the rights and/or are implied in the creation and distribution of the above mentioned things be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising form, out of or in connection with the above mentioned things or the use or other dealings in it.
87+
88+
The above copyright notice and this permission notice shall accompany and/or be included ( depending on the type of work ) in all the derived works from mine, as addendum to compliance with the provisions above.
89+
90+
If you need permissions that are beyond the scope of this license, you can ask to me through this facebook page <a xmlns:cc="http://creativecommons.org/ns#" href="https://www.facebook.com/dev.hackerinside/" rel="cc:morePermissions">https://www.facebook.com/dev.hackerinside/</a>
6691

67-
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/HackerInside0/Arduino_L293.git" property="cc:attributionName" rel="cc:attributionURL">Giuseppe Masino</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc="http://creativecommons.org/ns#" href="https://facebook.com/peppe.masino1" rel="cc:morePermissions">https://facebook.com/peppe.masino1</a>.
92+
The text of this license can also be found in the LICENSE.md file

examples/MotorControl/MotorControl.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
* Created by Giuseppe Masino, 25 may 2016
77
* Author URL http://www.facebook.com/peppe.masino1
8+
* Author email: dev.giuseppemasino@outlook.it
89
*
910
* This example and the L293 library are released under the license
1011
* CreativeCommons ShareAlike-Attribution
@@ -17,7 +18,7 @@
1718
* (on the Arduino MEGA2560 all pins from 2 to 13 are PWM-enabled)
1819
* (use of pin 13 is discouraged because it can cause issues when the board resets)
1920
*
20-
* - L293
21+
* - An L293 IC
2122
* - A DC Birirectional Motor (max 5V-4mA)
2223
* - A breadboard
2324
*
@@ -37,7 +38,7 @@
3738
//import the library in the sketch
3839
#include <L293.h>
3940

40-
//these variables are constants and won't change
41+
//these are constants and won't change
4142
//give a name to the pins that we use
4243
const int speedPin = 2; //that is the pin that we use to control the motor's speed
4344
const int forwardPin = 3; //this is the pin that we use to tell the motor to go forward

keywords.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
# Constants (LITERAL1)
55
#######################################
66

7-
L293_standalone KEYWORD1
7+
L293 KEYWORD1
88
L293_twoWire KEYWORD1
9+
stop KEYWORD2
10+
setPWMOffset KEYWORD2
11+
getRawPWMDC KEYWORD2
12+
getPWMDC KEYWORD2
913
forward KEYWORD2
1014
back KEYWORD2
11-
stop KEYWORD2
12-
setSpeedOffset KEYWORD2
15+
getDirection KEYWORD2
16+
forceStop KEYWORD2

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=L293
2-
version=2.0.0
2+
version=3.0.0
33
author=Giuseppe Masino <http://www.facebook.com/peppe.masino1>
44
maintainer=Giuseppe Masino <http://www.facebook.com/peppe.masino1>
55
sentence=Allow to control brushless motors with L293 motor driver

0 commit comments

Comments
 (0)