Hi all,
I connected a rotary encoder with the classic 5 pin layout (3 pins for the rotary part, 2 pins for the switch) to a Teensy LC. I'm using pin 2 on the LC for the switch and pin 3 and 4 for the rotary encoder. I connected the pins directly, no pull-up resistors.
Next, I used the code on https://www.pjrc.com/teensy/td_libs_Encoder.html
Where this code seems to output values ranging from -3 to 8, I only get 0 and -1. If the value is on 0 and I turn CW, I get -1 and if I turn CCW from 0, I get also -1.
I found https://forum.pjrc.com/threads/35879-MIDI-Controller-using-16-Rotary-Encoders, where some guy has 0 and 1 values, and someone else in that post says this is normal.
What am I doing wrong?
I did read that there are analogue and digital rotary encoders - I suppose I have a digital one, as I get alternating connectivity and disconnectivity between the outer pins and ground.
cheers,
BC
I connected a rotary encoder with the classic 5 pin layout (3 pins for the rotary part, 2 pins for the switch) to a Teensy LC. I'm using pin 2 on the LC for the switch and pin 3 and 4 for the rotary encoder. I connected the pins directly, no pull-up resistors.
Next, I used the code on https://www.pjrc.com/teensy/td_libs_Encoder.html
Where this code seems to output values ranging from -3 to 8, I only get 0 and -1. If the value is on 0 and I turn CW, I get -1 and if I turn CCW from 0, I get also -1.
I found https://forum.pjrc.com/threads/35879-MIDI-Controller-using-16-Rotary-Encoders, where some guy has 0 and 1 values, and someone else in that post says this is normal.
What am I doing wrong?
I did read that there are analogue and digital rotary encoders - I suppose I have a digital one, as I get alternating connectivity and disconnectivity between the outer pins and ground.
cheers,
BC
Last edited: