Skip to content

Commit 8f725ca

Browse files
committed
Switched to the newer EnableInterrupt library instead of the PinChangeInt library.
1 parent 8cffc67 commit 8f725ca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ROSRomeoNode.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Needed on Leonardo to force use of USB serial.
77
#define USE_USBCON
88

9-
#include <PinChangeInt.h>
9+
#include <EnableInterrupt.h>
1010
#include <SimplePID.h>
1111

1212
#include <ros.h>
@@ -99,10 +99,10 @@ void setup()
9999
pinMode(M1_DIRECTION, OUTPUT);
100100
pinMode(M2_DIRECTION, OUTPUT);
101101

102-
attachPinChangeInterrupt(M1_A, leftAChange, CHANGE);
103-
attachPinChangeInterrupt(M1_B, leftBChange, CHANGE);
104-
attachPinChangeInterrupt(M2_A, rightAChange, CHANGE);
105-
attachPinChangeInterrupt(M2_B, rightBChange, CHANGE);
102+
enableInterrupt(M1_A, leftAChange, CHANGE);
103+
enableInterrupt(M1_B, leftBChange, CHANGE);
104+
enableInterrupt(M2_A, rightAChange, CHANGE);
105+
enableInterrupt(M2_B, rightBChange, CHANGE);
106106

107107
nh.initNode();
108108

0 commit comments

Comments
 (0)