Skip to content

Commit 1d4697a

Browse files
author
Giuseppe Masino
committed
Committed release v3.1.0
1 parent 174c207 commit 1d4697a

File tree

20 files changed

+517
-670
lines changed

20 files changed

+517
-670
lines changed

Changelog.md

Lines changed: 94 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,94 @@
1-
symbols caption:
2-
> \+ added
3-
> \- removed
4-
> = changed/fixed
5-
> \* coming in a future release
6-
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-
22-
Changelog v2.0.0
23-
24-
> = Made updates and corrected some mistakes in **README.md**
25-
> = Updated **keywords.txt**
26-
> = Renamed the class **L293** in **L293\_standalone**
27-
> = Made **virtual** some public methods in the class **L293\_standalone** to allow to redefine them in the class **L293\_twoWire**
28-
> = Changed the type of the *protected* variable **speedOffset** in the class **L293\_standalone** from **uint8_t** to **int16_t** to allow it to assume values beetween -255 and 255
29-
> = Changed the type of the **_speedOffset** argument from **uint8_t** to **int16_t** in the class constructors and in the *public* method ***void L293_standalone::setSpeedOffset(int8_t _speedOffset)***
30-
> = Made minor changes in the ***virtual void L293\_standalone::forward(uint8_t _pwm)*** and the ***virtual void L293\_standalone::forward(uint8_t _pwm)*** methods
31-
>
32-
> \+ Added a new class named **L293\_twoWire**, derived from **L293\_standalone**, that adds support for motor control using only two wires. More details in **README.md**
33-
> \+ Added the *protected* method ***uint8_t getSpeedWithOffset(uint8_t _pwm)*** to the class **L293\_standalone**
34-
> \+ Added a new constructor to the class **L293\_standalone** that does nothing, necessary to allow the **L293\_twoWire** class to function properly
35-
> \+ Added comments to the code
36-
> \+ Added the file **LICENSE.md**
37-
> \+ Added new examples and updated the old ones
38-
39-
Changelog v1.0.1 :
40-
41-
> \- removed some useless code from "src/L293.cpp"
42-
>
43-
> = changed the repository url
44-
> = completely rewrited README.md
45-
>
46-
> \* add a full changelog file updated on every release
47-
48-
Changelog v1.0.1-transitionUpdate :
49-
50-
> Update that adds minor changes.
51-
> Necessary to allow the change of the repository URL in the Arduino library manager.
52-
> For the full changelog view the release v1.0.1
53-
54-
Changelog v1.0.0
55-
56-
> First release
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
[![Keep a Changelog specification badge](https://img.shields.io/badge/Keep%20a%20Changelog%20Specification-1.0.0-orange.svg)](http://keepachangelog.com)
8+
[![Semantic Versioning specification badge](https://img.shields.io/badge/Semantic%20Versioning%20Specification-2.0.0-orange.svg)](http://semver.org)
9+
10+
11+
## [Unreleased] ##
12+
13+
### Removed ###
14+
15+
- The ***getDirection()*** method
16+
17+
## [3.1.0] - 2017-06-17 ##
18+
19+
### Added ###
20+
21+
- The following methods to detect the motor's status:
22+
- ***isForceStopped()***
23+
- ***isStopped()***
24+
- ***isForward()***
25+
- ***isReverse()***
26+
- Better Doxigen-style comments
27+
28+
### Changed ###
29+
30+
- This changelog format is now based on [Keep a Changelog](http://keepachangelog.com/)
31+
- Rewrote the changelog to accomplish what about the previous point
32+
- Renamed the changelog file for the same purpose
33+
- **Updated the repository URL**
34+
- Updated **README.md**
35+
- Made the code more modular and extensible
36+
- Made a general cleanup of the code
37+
- Merged the examples that share most code
38+
39+
### Deprecated ###
40+
41+
- The ***getDirection()*** method is now replaced by the methods ***isForward(), isReverse(), isStopped()*** and ***isForceStopped()***
42+
43+
## [3.0.0] - 2017-01-04 ##
44+
45+
### Added ###
46+
47+
- Now is possible to change the motor direction without affect the current speed using a dedicated method
48+
- A method to get the direction of the motor
49+
- A method to get the current PWM value
50+
- A method to **"force stop"** the motor
51+
52+
### Changed ###
53+
54+
- Updated **README.md**
55+
- Now the class **L293\_standalone** is named **L293**
56+
- Rewrote the code for the **L293** class
57+
- Now the method **setSpeedOffset()** is named **setPWMOffset()**
58+
59+
### Fixed ###
60+
61+
- A bug about the timing when switching a motor from the forward mode to the reverse mode and viceversa, now it is immediate
62+
63+
## [2.0.0] - 2016-10-16 ##
64+
65+
### Added ###
66+
67+
- A new class named **L293\_twoWire**, derived from **L293\_standalone**, that adds support for motor control using only two wires.
68+
- Better comments to the code
69+
- The file **LICENSE.md**
70+
- New examples
71+
72+
### Changed ###
73+
74+
- Corrected some mistakes in **README.md**
75+
- Updated the old examples
76+
- Now the class **L293** is named **L293\_ standalone**
77+
- Now the **speed Offset** can be a value beetween -255 and 255
78+
79+
## [1.0.1] - 2016-08-25 ##
80+
81+
### Removed ###
82+
83+
- Some useless code
84+
85+
### Changed ###
86+
87+
- Updated the repository URL
88+
- Rewrited **README.md**
89+
90+
## [1.0.0] - 2016-08-11 ##
91+
92+
### Added ###
93+
94+
- Unreleased library files

LICENSE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#LICENSE
1+
# LICENSE #
22

33
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
44
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
55
</a>
66
<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:
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/qub1750ul/Arduino_L293" property="cc:attributionName" rel="cc:attributionURL">Giuseppe Masino (qub1750ul)</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:
88

99
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.
1010

@@ -16,4 +16,4 @@ If you need permissions that are beyond the scope of this license, you can ask t
1616

1717
Relatively to the Creative Commons Attribution-ShareAlike 4.0 International License:
1818
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
19+
Otherwise, the full license text can be found here: https://creativecommons.org/licenses/by-sa/4.0/legalcode

README.md

Lines changed: 18 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,38 @@
11
# L293 #
22

3-
Compatible architecture: ALL
3+
![Project status badge](https://img.shields.io/badge/Project%20status-ACTIVE-brightgreen.svg)
4+
[![License badge](https://img.shields.io/badge/license-custom%20CC%20BY--SA%204.0-brightgreen.svg)](https://github.com/qub1750ul/Arduino_L293/blob/master/LICENSE.md)
5+
[![Arduino Library specification badge](https://img.shields.io/badge/Arduino%20Library%20Specification%20-rev.%202.1-blue.svg)](https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification)
6+
[![Arduino IDE compatibility badge](https://img.shields.io/badge/Arduino%20IDE%20compatibility-1.6.10+-blue.svg)](https://www.arduino.cc/en/Main/Software)
7+
[![Keep a Changelog specification badge](https://img.shields.io/badge/Keep%20a%20Changelog%20Specification-1.0.0-orange.svg)](http://keepachangelog.com)
8+
[![Semantic Versioning specification badge](https://img.shields.io/badge/Semantic%20Versioning%20Specification-2.0.0-orange.svg)](http://semver.org)
49

5-
## Description ##
6-
7-
Library that allows to control bidirectional motors using the L293 IC in two different hardware configurations:
8-
9-
- standalone
10-
- twoWire
11-
12-
### standalone configuration ###
13-
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 ).
15-
The circuit must be like this:
16-
![L293_standalone HW configuration](https://github.com/HackerInside0/Arduino_L293/blob/master/extras/L293_standalone-HW-conf.png)
17-
18-
### twoWire configuration ###
19-
20-
This configuration is intended for use with a circuit like this:
21-
![L293_twoWire HW configuration](https://github.com/HackerInside0/Arduino_L293/blob/master/extras/L293_twoWire-HW-conf.png)
10+
An Arduino library that allows to control bidirectional motors using the L293 IC and compatible L298 boards.
2211

23-
Where only two wires are used to control the motor: the PWM signal and the direction signal ( excluding the power supply )
24-
25-
## Sintax & short command reference ##
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 ###
45-
46-
- Creating an istance
47-
48-
*L293 motor(pwmPin, forwardPin, backPin);*
49-
*L293 motor(pwmPin, forwardPin, backPin, speedOffset);*
50-
51-
**motor** : the name of the object
52-
**pwmPin** : the pin that generate the pwm signal used to control the motor speed
53-
**forwardPin** : the digital pin used to tell the motor to go forward
54-
**backpin** : the digital pin used to tell the motor to go reverse
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
60-
61-
### Reference for the L293_twoWire configuration only ###
12+
## Description ##
6213

63-
- Creating an istance
14+
This library is designed to make easy the control of bidirectional motors either for beginners or for experts, providing a level of abstraction over the direct "lower-level" management of the MCU I/O ports that drive the H-bridge(s).
6415

65-
*L293_twoWire motor(pwmPin, directionPin);*
66-
*L293_twoWire motor(pwmPin, directionPin, speedOffset);*
67-
68-
**motor** : the name of the object
69-
**pwmPin** : the pin that generate the pwm signal used to control the motor speed
70-
**directionPin** : the digital pin used to manage the motor direction
71-
**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)
72-
(e.g. in a robot two motors must rotate at the same speed, but one is more powerful than other)
16+
This means that the programmer haven't to care about the implementation of the control code and timings and can focus on the desired behavior.
7317

18+
The main goal of this library is to be simple to use for beginners but flexible for experts.
7419

20+
[Checkout the wiki for more information](https://github.com/qub1750ul/Arduino_L293/wiki/)
7521

76-
## About the author & license info
22+
## About the author & license info ##
7723

7824
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
7925
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
8026
</a>
8127
<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:
28+
<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://facebook.com/dev.giuseppemasino" 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:
8329

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.
30+
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.
8531

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.
32+
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.
8733

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.
34+
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.
8935

9036
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>
9137

92-
The text of this license can also be found in the LICENSE.md file
38+
The text of this license can also be found in the LICENSE.md file

examples/MotorControl/MotorControl.ino

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)