This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Running multiple encoders with QDEC library

Hello!

I was just wondering if it is possible to use multiple encoders at once with the QDEC driver? Can you initialize multiple encoders on different pins or do you have to alternatively uninitialize one before initializing another one on different pins?

Thank you.

Filip

  • Hi Filip

    The QDEC peripheral only supports one decoder at a time. 

    If you need to support multiple decoders you either need to uninitialize and reinitialize the QDEC as you say, or implement one decoder using the QDEC and another using other methods (such as configuring the GPIOTE to generate interrupts on pin changes, and decode the signals manually in the interrupt handler). 

    Best regards
    Torbjørn

Related