Skip to content

Commit 9e3408d

Browse files
committed
Change multi-examples to managed attach
1 parent d040a66 commit 9e3408d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

examples/PinChangeInt/PinChangeLib/PinChangeLib.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ ServoInputPin<pin2> servo2;
5353

5454
void setup() {
5555
Serial.begin(115200);
56-
servo1.attach(); // attaches the first servo input interrupt
57-
servo2.attach(); // attaches the second servo input interrupt
56+
ServoInput.attach(); // attach all inputs
5857

5958
// wait for all servo signals to be read for the first time
6059
while (!ServoInput.available()) {

examples/RC_Receiver/RC_Receiver.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ ServoInputPin<ThrottleSignalPin> throttle(ThrottlePulseMin, ThrottlePulseMax);
5353

5454
void setup() {
5555
Serial.begin(115200);
56-
steering.attach(); // attaches the steering servo input interrupt
57-
throttle.attach(); // attaches the throttle servo input interrupt
56+
ServoInput.attach(); // attach all inputs
5857

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

0 commit comments

Comments
 (0)