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: docs/api.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### `attach()`
6
6
7
-
Attach the Servo variable to a pin. Note that in Arduino 0016 and earlier, the Servo library supports only servos on only two pins: 9 and 10.
7
+
Attach the Servo variable to a pin. Note that in Arduino 0016 and earlier, the Servo library supports servos on only two pins: 9 and 10.
8
8
9
9
#### Syntax
10
10
@@ -17,8 +17,8 @@ servo.attach(pin, min, max)
17
17
18
18
*_servo_: a variable of type `Servo`
19
19
*_pin_: the number of the pin that the servo is attached to
20
-
*_min_ (optional): the pulse width, in microseconds, corresponding to the minimum (0-degree) angle on the servo (defaults to 544)
21
-
*_max_ (optional): the pulse width, in microseconds, corresponding to the maximum (180-degree) angle on the servo (defaults to 2400)
20
+
*_min_ (optional): the pulse width, in microseconds, corresponding to the minimum (0degree) angle on the servo (defaults to 544)
21
+
*_max_ (optional): the pulse width, in microseconds, corresponding to the maximum (180degree) angle on the servo (defaults to 2400)
22
22
23
23
#### Example
24
24
@@ -77,7 +77,7 @@ void loop() {}
77
77
78
78
### `writeMicroseconds()`
79
79
80
-
Writes a value in microseconds (uS) to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft. On standard servos a parameter value of 1000 is fully counter-clockwise, 2000 is fully clockwise, and 1500 is in the middle.
80
+
Writes a value in microseconds (us) to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft. On standard servos a parameter value of 1000 is fully counter-clockwise, 2000 is fully clockwise, and 1500 is in the middle.
81
81
82
82
Note that some manufactures do not follow this standard very closely so that servos often respond to values between 700 and 2300. Feel free to increase these endpoints until the servo no longer continues to increase its range. Note however that attempting to drive a servo past its endpoints (often indicated by a growling sound) is a high-current state, and should be avoided.
83
83
@@ -86,13 +86,13 @@ Continuous-rotation servos will respond to the writeMicrosecond function in an a
86
86
#### Syntax
87
87
88
88
````
89
-
servo.writeMicroseconds(uS)
89
+
servo.writeMicroseconds(us)
90
90
````
91
91
92
92
#### Parameters
93
93
94
94
*_servo_: a variable of type Servo
95
-
*_uS_: the value of the parameter in microseconds (int)
95
+
*_us_: the value of the parameter in microseconds (int)
96
96
97
97
#### Example
98
98
@@ -163,7 +163,7 @@ servo.attached()
163
163
164
164
### `detach()`
165
165
166
-
Detach the Servo variable from its pin. If all Servo variables are detached, then pins 9 and 10 can be used for PWM output with [analogWrite()](#analogwrite).
166
+
Detach the Servo variable from its pin. If all Servo variables are detached, then pins 9 and 10 can be used for PWM output with [analogWrite()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/).
Copy file name to clipboardExpand all lines: docs/readme.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,9 @@ To use this library:
13
13
14
14
## Circuit
15
15
16
-
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board. The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board. Note that servos draw considerable power, so if you need to drive more than one or two, you'll probably need to power them from a separate supply (i.e. not the +5V pin on your Arduino). Be sure to connect the grounds of the Arduino and external power supply together.
16
+
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board. The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board. Note that servos draw considerable power, so if you need to drive more than one or two, you'll probably need to power them from a separate supply (i.e. not the 5V pin on your Arduino). Be sure to connect the grounds of the Arduino and external power supply together.
17
17
18
18
## Examples
19
19
20
20
*[Knob](https://www.arduino.cc/en/Tutorial/Knob): control the shaft of a servo motor by turning a potentiometer
21
-
*[Sweep](https://www.arduino.cc/en/Tutorial/Sweep): sweeps the shaft of a servo motor back and forth
21
+
*[Sweep](https://www.arduino.cc/en/Tutorial/LibraryExamples/Sweep): sweeps the shaft of a servo motor back and forth
Copy file name to clipboardExpand all lines: examples/Knob/readme.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This example makes use of the Arduino `Servo` library.
13
13
14
14
## Circuit
15
15
16
-
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino or Genuino board. The ground wire is typically black or brown and should be connected to a ground pin on the board. The signal pin is typically yellow or orange and should be connected to pin 9 on the board.
16
+
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the board. The signal pin is typically yellow or orange and should be connected to pin 9 on the board.
17
17
18
18
The potentiometer should be wired so that its two outer pins are connected to power (+5V) and ground, and its middle pin is connected to analog input 0 on the board.
Copy file name to clipboardExpand all lines: examples/Sweep/readme.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Sweeps the shaft of a RC [servo motor](http://en.wikipedia.org/wiki/Servo_motor#
10
10
11
11
## Circuit
12
12
13
-
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino or Genuino board. The ground wire is typically black or brown and should be connected to a ground pin on the board. The signal pin is typically yellow, orange or white and should be connected to pin 9 on the board.
13
+
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the board. The signal pin is typically yellow, orange or white and should be connected to pin 9 on the board.
14
14
15
15

16
16
@@ -26,4 +26,4 @@ Servo motors have three wires: power, ground, and signal. The power wire is typi
26
26
*[write()](/docs/api.md#write)
27
27
*[map()](https://www.arduino.cc/en/Reference/Map)
28
28
*[Servo library reference](/docs/readme.md)
29
-
*[Knob](../Knob) - Sweep the shaft of a servo motor back and forth
29
+
*[Knob](../Knob) - Control the position of a servo with a potentiometer
Copy file name to clipboardExpand all lines: library.properties
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@ name=Servo
2
2
version=1.1.7
3
3
author=Michael Margolis, Arduino
4
4
maintainer=Arduino <info@arduino.cc>
5
-
sentence=Allows Arduino/Genuino boards to control a variety of servo motors.
6
-
paragraph=This library can control a great number of servos.<br />It makes careful use of timers: the library can control 12 servos using only 1 timer.<br />On the Arduino Due you can control up to 60 servos.<br />
5
+
sentence=Allows Arduino boards to control a variety of servo motors.
6
+
paragraph=This library can control a great number of servos.<br />It makes careful use of timers: the library can control 12 servos using only 1 timer.<br />On the Arduino Due you can control up to 60 servos.
0 commit comments