Skip to content

Commit 299749c

Browse files
committed
BUGFIX voltage control
1 parent bded9cc commit 299749c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/encoder_examples/voltage_control/voltage_control.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#include <SimpleFOC.h>
2+
// software interrupt library
3+
#include <PciManager.h>
4+
#include <PciListenerImp.h>
25

36
// Only pins 2 and 3 are supported
47
#define arduinoInt1 2 // Arduino UNO interrupt 0
@@ -20,6 +23,7 @@ Encoder encoder = Encoder(arduinoInt1, arduinoInt2, 8192, A0);
2023
void doA(){encoder.handleA();}
2124
void doB(){encoder.handleB();}
2225
void doIndex(){encoder.handleIndex();}
26+
2327
// If no available hadware interrupt pins use the software interrupt
2428
PciListenerImp listenerIndex(encoder.index_pin, doIndex);
2529

0 commit comments

Comments
 (0)