Correct the rotary trinkey examples inverting the button state. Fixes #2370
This commit is contained in:
parent
50b702f550
commit
4afe72fe28
2 changed files with 2 additions and 2 deletions
|
|
@ -47,7 +47,7 @@ void loop() {
|
|||
int curr_rotary = encoder.getPosition();
|
||||
RotaryEncoder::Direction direction = encoder.getDirection();
|
||||
// read switch
|
||||
bool curr_button = !digitalRead(PIN_ENCODER_SWITCH);
|
||||
bool curr_button = digitalRead(PIN_ENCODER_SWITCH);
|
||||
|
||||
if (direction != RotaryEncoder::Direction::NOROTATION) {
|
||||
Serial.print("Encoder value: ");
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void loop() {
|
|||
int curr_rotary = encoder.getPosition();
|
||||
RotaryEncoder::Direction direction = encoder.getDirection();
|
||||
// read switch
|
||||
bool curr_button = !digitalRead(PIN_ENCODER_SWITCH);
|
||||
bool curr_button = digitalRead(PIN_ENCODER_SWITCH);
|
||||
|
||||
if (direction != RotaryEncoder::Direction::NOROTATION) {
|
||||
Serial.print("Encoder value: ");
|
||||
|
|
|
|||
Loading…
Reference in a new issue