You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,24 @@
1
1
# Servo Hardware PWM Library for Arduino Mega
2
2
3
-
This library allows Arduino/Genuino Mega boards to control up to **6 servos** with the integrated **16-bit hardware PWM timer/counter**.
3
+
This library allows Arduino/Genuino Mega boards to control up to **9 servos** with the integrated **16-bit hardware PWM timer/counter**.
4
4
16-bit hardware timer/counter (timer3, timer4 and timer5) are used to control the servos.
5
5
6
6
Unlike the original Servo.h library, this library does not use timer1.
7
7
The advantage here is that when using the Wire.h library no fluctuations in the pulse width occur.
8
8
In addition, I/O registers are addressed directly and not via the digitalWrite()-function (as in Servo.h).
9
9
10
-
Possible output pins are **pin 2, 3, 7, 8, 44,** and **45**.
10
+
Possible output pins are **pin 2, 3, 5, 6, 7, 8, 44, 45** and **46**.
11
11
**Only Arduino/Genuino Mega boards are supported!**
12
12
13
13
### Installation
14
14
This library can be installed through the Arduino IDE library manager like so:
15
15

16
16
17
-
### Note
17
+
### Notes
18
+
Starting from version 1.3.0 this Servo-Library supports 9 instead of 6 servos! (usable pins are: 2, 3, 5, 6, 7, 8, 44, 45 and 46)
19
+
20
+
---
21
+
18
22
Starting from version 1.2.0 this Servo-Library is compatible with all the [original Arduino Servo Library](https://github.com/arduino-libraries/Servo) - commands available. In addition to these "standard"-functions, following commands are added:
19
23
*``` attach(int pin, int min, int max, int defaultPos)``` - Besides the ability to set the servo pin and the upper and lower pulse width limit, the starting pulse width of the servo can be set with the defaultPos. This allows the servo to start from a user-defined angle instead of the middle position.
20
24
*```detachAll()``` - This feature allows detaching all servos at once.
@@ -32,4 +36,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
32
36
### Acknowledgments
33
37
* Inspired by - [original Arduino Servo Library](https://github.com/arduino-libraries/Servo)
34
38
* Thanks for helping me to improve my library - [per1234](https://github.com/per1234)
39
+
* Thanks for helping me to improve my library - [QuadCorei8085](https://github.com/QuadCorei8085)
35
40
* Screen-GIF recorded with - [ShareX](https://getsharex.com/)
sentence=Allows Arduino/Genuino Mega boards to control up to 6 servos with the integrated 16-bit hardware PWM timer/counter.
6
-
paragraph=<br />This library uses the 16-bit hardware timer/counter (timer3, timer4 and timer5) to control the servos.<br />Possible output pins are pin 2, 3, 7, 8, 44, and 45.<br />Unlike the original Servo.h library, this library does not use Timer1.<br />The advantage here is that when using the Wire.h library no fluctuations in the pulse width occur.<br />In addition, I / O registers are addressed directly and not via the digitalWrite()-function (as in Servo.h).<br />
5
+
sentence=Allows Arduino/Genuino Mega boards to control up to 9 servos with the integrated 16-bit hardware PWM timer/counter.
6
+
paragraph=<br />This library uses the 16-bit hardware timer/counter (timer3, timer4 and timer5) to control the servos.<br />Possible output pins are pin 2, 3, 5, 6, 7, 8, 44, 45 and 46.<br />Unlike the original Servo.h library, this library does not use Timer1.<br />The advantage here is that when using the Wire.h library no fluctuations in the pulse width occur.<br />In addition, I / O registers are addressed directly and not via the digitalWrite()-function (as in Servo.h).<br />
0 commit comments