Skip to content

Commit bbc30eb

Browse files
author
HackerInside0
committed
Committed release v1.0.1
See the changelog for more details
1 parent 57ecfc4 commit bbc30eb

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,41 @@
11
# L293
2-
Library for the control of bidirectional motors and not by the integrated circuit L293
32

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
637

738
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
940

10-
License info: http://creativecommons.org/licenses/by-sa/4.0/
41+
License info: http://creativecommons.org/licenses/by-sa/4.0/

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name=L293
2-
version=1.0.0
2+
version=1.0.1
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
66
paragraph=
77
category=Device Control
8-
url=https://github.com/HackerInside0/L293.git
8+
url=https://github.com/HackerInside0/Arduino_L293.git
99
architectures=*
1010
dot_a_linkage=true
1111
includes=L293.h

src/L293.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ void L293::forward(uint8_t _pwm)
3535

3636
void L293::back(uint8_t _pwm)
3737
{
38-
if(reversePin == 255) return this->forward(_pwm);
3938
this->stop();
4039
digitalWrite(reversePin, HIGH);
4140
analogWrite(enablePin, _pwm + speedOffset);
@@ -45,7 +44,6 @@ void L293::stop()
4544
{
4645
analogWrite(enablePin, 0);
4746
digitalWrite(forwardPin, LOW);
48-
if(reversePin != 255) digitalWrite(reversePin, LOW);
4947
}
5048

5149
void L293::setSpeedOffset(uint8_t _speedOffset)

src/L293.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class L293
2929
void stop(void);
3030
void setSpeedOffset(byte _speedOffset);
3131

32-
private:
32+
protected:
3333

3434
uint8_t enablePin, forwardPin, reversePin, speedOffset;
3535
};

0 commit comments

Comments
 (0)