Skip to content

Commit 0827917

Browse files
committed
The default timings were chosen vastly outside specification. On COTS servos, this causes much confusion for the user, because a wide range of angle starting from 0 degress, and a just a large range of angle leading up to 180 degrees, is dead - in fact, the servo doesn't move at all, from any position.
Not investigated further for obvious reasons, as this may have also destroyed servos that ran hot trying to abide by the PWM signal but could not mechanically!
1 parent 996211f commit 0827917

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/Servo/src/Servo.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//
3030
// attach(pin ) - Attaches a servo motor to an i/o pin.
3131
// attach(pin, min, max ) - Attaches to a pin setting min and max values in microseconds
32-
// default min is 544, max is 2400
32+
// default min is 800, max is 2190
3333
//
3434
// write() - Sets the servo angle in degrees. (invalid angle that is valid as pulse in microseconds is treated as microseconds)
3535
// writeMicroseconds() - Sets the servo pulse width in microseconds
@@ -46,10 +46,10 @@
4646

4747
// the following are in us (microseconds)
4848
//
49-
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo
50-
#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo
51-
#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached
52-
#define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds
49+
#define MIN_PULSE_WIDTH 800 // the shortest duty cycle sent to a servo
50+
#define MAX_PULSE_WIDTH 2190 // the longest duty cycle sent to a servo
51+
#define DEFAULT_PULSE_WIDTH 1500 // default duty cycle when servo is attached
52+
#define REFRESH_INTERVAL 20000 // classic default period to refresh servos in microseconds
5353
#define MAX_SERVOS 12
5454

5555
#if !defined(ESP8266)

0 commit comments

Comments
 (0)