Skip to content

RP2040 unreliable encoder and external interrupts #583

Open
@ale-novo

Description

@ale-novo

Hello, working with ConfigurableFirmata and RP2040 ive noticed the encoder library works unreliably for this board.
I get encoder readings however they are unreliable. meaning if i turn left sometimes the value increases, sometimes decreases, skips steps, and the same the other way. Also there is no correlation with the number of clicks of the encoder and the increase/decrease of the reading.
I suspect this issue is related with RP2040 interrupts.

This works great for other boards like arduino nano for instance.

Sketch:
https://github.com/PaulStoffregen/Encoder/blob/master/examples/Basic/Basic.ino

Encoder library: https://github.com/PaulStoffregen/Encoder

Support for RP2040 in this fork of the encoder library: https://github.com/oerkel47/Encoder/

Ive installed the RP2040 board in the Arduino IDE ARDUINO MBED OS RP2040 3.4.1

ive done some research and this issue has been reported here #253
and here: PaulStoffregen/Encoder#69

in theory it was fixed here: #256

however its not working for me, can you please help me? having the encoder work is the last piece in the puzle to start using RP2040 for my projects. thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions