Skip to content

Commit c09aff5

Browse files
authored
Merge pull request #2371 from DeeHants/main
Correct the rotary trinkey examples inverting the button state. Fixes…
2 parents 50b702f + 4afe72f commit c09aff5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Rotary_Trinkey/surfacedial_encoder_demo/surfacedial_encoder_demo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void loop() {
4747
int curr_rotary = encoder.getPosition();
4848
RotaryEncoder::Direction direction = encoder.getDirection();
4949
// read switch
50-
bool curr_button = !digitalRead(PIN_ENCODER_SWITCH);
50+
bool curr_button = digitalRead(PIN_ENCODER_SWITCH);
5151

5252
if (direction != RotaryEncoder::Direction::NOROTATION) {
5353
Serial.print("Encoder value: ");

Rotary_Trinkey/volumemute_encoder_demo/volumemute_encoder_demo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void loop() {
4747
int curr_rotary = encoder.getPosition();
4848
RotaryEncoder::Direction direction = encoder.getDirection();
4949
// read switch
50-
bool curr_button = !digitalRead(PIN_ENCODER_SWITCH);
50+
bool curr_button = digitalRead(PIN_ENCODER_SWITCH);
5151

5252
if (direction != RotaryEncoder::Direction::NOROTATION) {
5353
Serial.print("Encoder value: ");

0 commit comments

Comments
 (0)