Skip to content

Commit 8927e00

Browse files
committed
clarify 0 and 180 as limit
1 parent 1e91fd3 commit 8927e00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Servo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Servo
108108
uint8_t attach(int pin); // attach the given pin to the next free channel, sets pinMode, returns channel number or INVALID_SERVO if failure
109109
uint8_t attach(int pin, int min, int max); // as above but also sets min and max values for writes.
110110
void detach();
111-
void write(int value); // if value is < 544 and desired arch is not nrf52, its treated as an angle, otherwise as pulse width in microseconds
111+
void write(int value); // if value is < 544 and desired arch is not nrf52, its treated as an angle between 0 and 180, where values higher than 180 are set to 180 and values less than 0 are set to 0; otherwise as pulse width in microseconds
112112
void writeMicroseconds(int value); // Write pulse width in microseconds
113113
int read(); // returns current pulse width as an angle between 0 and 180 degrees
114114
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)

0 commit comments

Comments
 (0)