mathertel / RotaryEncoder

RotaryEncoder Arduino Library
Other
342 stars 107 forks source link

Working on mega 2560 #6

Closed dragoblaztr closed 4 years ago

dragoblaztr commented 6 years ago

What changes are required to make it work into a mega 2560, because it doesn't work as it is.

Regards

acca84 commented 6 years ago

Hi try : RotaryEncoder encoder(A10, A11); // connect rotary to A10 and A11 instead of A2, A3 In the setup, use this two lines : PCICR |= (1 << PCIE2);
PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);

And replace the begining of the function by this : ISR(PCINT2_vect) { ...

dragoblaztr commented 6 years ago

If you don't mind, could you share information about mega2560 ports, pins and masks?

acca84 commented 6 years ago

I don't have those infos

I made it work with Luck ! :D

DjamTechnologies commented 4 years ago

thank

Ryder17z commented 4 years ago

I just tested this library and it works fine on my mega 2560

mathertel commented 4 years ago

Thanks