Skip to content

update description of write method #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
clarify 0 and 180 as limit
  • Loading branch information
nkaaf committed Feb 14, 2022
commit 8927e0093a7587aa1ffe5d2ed792a7e5f113622f
2 changes: 1 addition & 1 deletion src/Servo.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Servo
uint8_t attach(int pin); // attach the given pin to the next free channel, sets pinMode, returns channel number or INVALID_SERVO if failure
uint8_t attach(int pin, int min, int max); // as above but also sets min and max values for writes.
void detach();
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
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
void writeMicroseconds(int value); // Write pulse width in microseconds
int read(); // returns current pulse width as an angle between 0 and 180 degrees
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
Expand Down