From b9b072119bd44be4c3078255e57b69ab990b5310 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 3 Jun 2023 22:46:17 +0200 Subject: [PATCH] Add pin mode. --- .../usermod_v2_rotary_encoder_ui_ALT.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h index b1674951..cdb4f04c 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h @@ -479,7 +479,8 @@ void RotaryEncoderUIUsermod::setup() return; } else { if (pinIRQ >= 0 && pinManager.allocatePin(pinIRQ, false, PinOwner::UM_RotaryEncoderUI)) { - attachInterrupt(pinIRQ, i2cReadingISR, CHANGE); // RISING, FALLING, CHANGE, ONLOW, ONHIGH + pinMode(pinIRQ, INPUT_PULLUP); + attachInterrupt(pinIRQ, i2cReadingISR, FALLING); // RISING, FALLING, CHANGE, ONLOW, ONHIGH DEBUG_PRINTLN(F("Interrupt attached.")); } else { DEBUG_PRINTLN(F("Unable to allocate interrupt pin, disabling."));