Site icon Renzo Mischianti

PCF8574: Reading from multiple encoders

First of all, want to thank you for creating this great library! I'm trying to get two encoders to work, with following setups:
int encoderPinA = P0;
int encoderPinB = P1;
int encoderPinC = P2;
int encoderPinD = P3;
pcf8574.encoder(encoderPinA, encoderPinB);
pcf8574.encoder(encoderPinC, encoderPinD); And read values by calling these functions:
pcf8574.readEncoderValue(encoderPinA, encoderPinB, &encoderValue1)
pcf8574.readEncoderValue(encoderPinC, encoderPinD, &encoderValue2)
However, the encoderValue1 and encoderValue2 can only goes up, no matter which direction I turn, but if with only one encoder, it works fine (clockwise +1 & counter -1) Wondering if you could give some suggestions what I can implement this? Cheers!
Exit mobile version