PaulStoffregen / Encoder

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

input_pullup + interrupt fail on Arduino Due #10

Open MaxJG opened 8 years ago

MaxJG commented 8 years ago

Dear Paul,

It seems that something doesn't work when using encoders with open collector outputs.

Something disable the pinMode(pin, INPUT_PULLUP) command and put it back to HiZ state, thus compromising the reading of the encoder outputs.

Best,

Max

Der-Modellmann commented 7 years ago

I have a similar problem. If I #define INPUT_PULLUP an error occure.

Arduino: 1.8.2 (Windows 10), Board: "Arduino Due (Programming Port)"

In file included from C:\Users___\achse5test.ino:12:0:

C:\Users\gabri\Google Drive\Arduino\libraries\Encoder-master/Encoder.h: In constructor 'Encoder::Encoder(uint8_t, uint8_t)':

C:\Users\gabri\Google Drive\Arduino\libraries\Encoder-master/Encoder.h:74:29: error: expected primary-expression before ')' token

pinMode(pin1, INPUT_PULLUP);

                         ^

C:\Users\gabri\Google Drive\Arduino\libraries\Encoder-master/Encoder.h:75:29: error: expected primary-expression before ')' token

pinMode(pin2, INPUT_PULLUP);

                         ^

exit status 1 Fehler beim Kompilieren für das Board Arduino Due (Programming Port).

Dieser Bericht wäre detaillierter, wenn die Option "Ausführliche Ausgabe während der Kompilierung" in Datei -> Voreinstellungen aktiviert wäre.