Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Encoders change twice per detent. Make them change only once?

  1. #1

    Encoders change twice per detent. Make them change only once?

    Encoders change between the detents and also on the detents. I seem to remember in some library somewhere there was an option to change this. Is there? Thanks everyone.

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    779
    When using the Teensyduino supplied Encoder library, you will see that the counter increases or decreases by 4 when you rotate a rotary encoder from one detent to the next detent.
    Just divide the count by 4 and you have 1 count/detent.

    Is this what you mean or...?

    Paul

  3. #3
    Paul, that's not it but thank you. I'm using the built-in library. There are 12 detents(approx) but 24 transitions. I can get it to increment by 1 if I leave the knob between detents but it's very fiddly.
    Using EC-11s I think if that matters.

  4. #4
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    779
    Allright. Just curious, what do you mean by built-in library?

    Paul

  5. #5
    I realised that I could just divide by 2 instead of 4 and it does what I want. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •