You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Hi John,
I was looking at the example-code in the comment-section of the encoder.h
The text was updated successfully, but these errors were encountered: