Skip to content

Commit

Permalink
Change multi-examples to managed attach
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadison committed Jan 4, 2025
1 parent d040a66 commit 9e3408d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/PinChangeInt/PinChangeLib/PinChangeLib.ino
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ ServoInputPin<pin2> servo2;

void setup() {
Serial.begin(115200);
servo1.attach(); // attaches the first servo input interrupt
servo2.attach(); // attaches the second servo input interrupt
ServoInput.attach(); // attach all inputs

// wait for all servo signals to be read for the first time
while (!ServoInput.available()) {
Expand Down
3 changes: 1 addition & 2 deletions examples/RC_Receiver/RC_Receiver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ ServoInputPin<ThrottleSignalPin> throttle(ThrottlePulseMin, ThrottlePulseMax);

void setup() {
Serial.begin(115200);
steering.attach(); // attaches the steering servo input interrupt
throttle.attach(); // attaches the throttle servo input interrupt
ServoInput.attach(); // attach all inputs

while (!ServoInput.available()) { // wait for all signals to be ready
Serial.println("Waiting for servo signals...");
Expand Down

0 comments on commit 9e3408d

Please sign in to comment.