Skip to content

Commit

Permalink
Add attach() call to README snippet
Browse files Browse the repository at this point in the history
This is now required for the library to work (c8d7925).
  • Loading branch information
dmadison committed Jan 25, 2024
1 parent 401833f commit 6a43ba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ For more information, [see the article](https://www.partsnotincluded.com/servo-i

ServoInputPin<2> servo;

void setup() {}
void setup() {
servo.attach();
}

void loop() {
float angle = servo.getAngle(); // get angle of servo (0 - 180)
Expand Down

0 comments on commit 6a43ba3

Please sign in to comment.