Skip to content

Doc: clarify that Servo::read() does not read the servo angle #136

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

Merged
merged 2 commits into from
Apr 19, 2025
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ void loop() {}

### `read()`

Read the current angle of the servo (the value passed to the last call to [write()](#write)).
Read the current setpoint of the servo (the angle passed to the last call to [write()](#write)).

Note that the servo has no way of reporting its current physical orientation. This method returns the angle to which the sketch program has requested the servo to move, regardless of whether the servo has already reached that angle.

#### Syntax

Expand All @@ -132,7 +134,7 @@ servo.read()

#### Returns

The angle of the servo, from 0 to 180 degrees.
The setpoint of the servo, as an angle from 0 to 180 degrees.

#### See also

Expand Down