-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi John,
I was looking at the example-code in the comment-section of the encoder.h
/* USAGE FOR ONE ENCODER:
// define the input pins
#define pinA 19
#define pinB 20
#define pinP 21
// create an encoder object initialized with their pins
Encoder encoder( pinA, pinB, pinP );
// setup code
void setup()
{
// start the encoder time interrupts
EncoderInterrupt.begin( &encoder );
}
// loop code
void loop()
{
// read the debounced value of the encoder button
bool pb = encoder.button();
// get the encoder variation since our last check, it can be positive or negative, or zero if the encoder didn't move
// only call this once per loop cicle, or at any time you want to know any incremental change
int delta = encoder.delta();
// add the delta value to the variable we are controlling
myEncoderControlledVariable += delta;
// do stuff with the updated value
// that's it
}
*/
´´´
it is missing the include-compiler-directive
Would you mind adding this to make the code ready to compile?
best regards Stefan
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels