Wheel encoder set #1218 with arduino micro

Hello,

i try to use the wheel encoder set with an arduino micro but inclusing the library i get the following error:

#include <PololuWheelEncoders.h>
PololuWheelEncoders encoders;

Error:

PololuWheelEncoders.cpp : : In function 'void enable_interrupts_for_pin(unsigned char)':
PololuWheelEncoders.cpp : 'PCIE2' was not declared in this scope
PololuWheelEncoders.cpp : 'PCIE1' was not declared in this scope
PololuWheelEncoders.cpp : : In static member function 'static void PololuWheelEncoders::init(unsigned char, unsigned char, unsigned char, unsigned char)':
PololuWheelEncoders.cpp : 'PCIF1' was not declared in this scope
PololuWheelEncoders.cpp : 'PCIF2' was not declared in this scope

Any hints for me to solve the problem?

Kind regards,

Maurice

Hello, Maurice.

Unfortunately, our wheel encoder library is not compatible with the Arduino Micro.

-Brandon

Hi,

thanks for your answer. I guess it should not that complicated to fix as long the problem is the portmapping or similar. Are there any other users with same problem? Did anybody worked on that?

Thx,

Maurice

I have not heard of anyone else who has used (or tried to use) our encoder library with the Arduino Micro. If you want to try to modify our library, you might start by comparing the pin change interrupts on the ATmega 32U4 with those on the ATmega328P to see what would need to change. If no one here has any other suggestions, you could try posting on the Arduino forum as well.

-Brandon

Hi,

sorry, i think i made a mistake because the 32u4has 4 hardware interrupts, so i could work with them via attachInterupt(). That shouild be easier. :wink:

Thanks for your help,

Maurice