Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pimoroni RGB I2C rotary encoder not seeing interrupts on an RPi 4B #29

Closed
bobrathbone opened this issue Jun 15, 2024 · 1 comment
Closed

Comments

@bobrathbone
Copy link

bobrathbone commented Jun 15, 2024

Using product [https://shop.pimoroni.com/products/rgb-encoder-breakout?variant=32236590399571]
I have successfully been running these encoders for a couple of years using my own software based up the Pimoroni ioe-python library without problem. However I recently re-installed my software on a Raspberry Pi 4b
I then tested using the example code the colour LEDs light up but when I turn the Rotary encoder I don't see any interrupts. This is the same behavior using both Bookworm and Bullseye OS OS. See code from rotary.py below

while True:
    if ioe.get_interrupt():
        count = ioe.read_rotary_encoder(1)
        ioe.clear_interrupt()

The I2C address is 0x0F.
I then remembered I had previously running these encoders on a Rasberry Pi model 3B so I tried the same SD card and software on an RPi model 3B and lo and behold the encoders worked. I re-checked on a model 4B and again it would not see the encoder interrupts. Is this a known problem with 4Bs and these encoders?

@bobrathbone

@bobrathbone
Copy link
Author

Using interrupt_pin=None does help as the program now sees rotations however it puts the program into polling mode which wasn't what was desired. I wired up both encoders with the interrupt pins wired to two separate GPIOs and which now works fine. So this problem is SOLVED.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant