PaulStoffregen / Encoder

Quadrature Encoder Library for Arduino
http://www.pjrc.com/teensy/td_libs_Encoder.html
540 stars 239 forks source link

Internal pull-up #88

Open LazaroFilm opened 1 year ago

LazaroFilm commented 1 year ago

How do I use the internal pull-up resistors for the encoder while using interrupt pins?

LazaroFilm commented 1 year ago

Solved. I just had to read through endoder.h on line 80 I need to #DEFINE INPUT_PULLUP

LazaroFilm commented 1 year ago

So turns out Defining it creates an error. Still investigating this. Also, I'm on a RP2040 which seems to be an issue as well.

mich-j commented 4 months ago

I have also encountered this issue, I think that the root cause is INPUT_PULLUP name being already taken by typedef enum PinMode in one of the Arduino Framework files, Common.h. There is a simple workaround, just change it to ENCODER_INPUT_PULLUP or something like that in Encoder.h.