encoder.h with moteino mega wont work

Started by bgreene, April 03, 2015, 09:34:23 AM

bgreene

I want to use the encoder library with the moteino mega. If I pick moteino as my board, it compiles ok but when i pick moteino mega (plain or dualoptiboot) it tells me
Quote
Encoder/utility/interrupt_pins.h:150:2: error: #error "Interrupts are unknown for this board, please add to this code"
#error "Interrupts are unknown for this board, please add to this code"
/home/bill/sketchbook/libraries/Encoder/utility/interrupt_pins.h:153:2: error: #error "Encoder requires interrupt pins, but this board does not have any :("
#error "Encoder requires interrupt pins, but this board does not have any
Any suggestion?
Bill

Felix

Is this library bundled with the Arduino IDE? It doesn't appear so.
Anyway the error message suggests that your Encoder library does not have any interrupt definitions for the Atmega1284p MCU.
You might want to ask the creators of that library for support.

bgreene

Thanks Felix, I'm using https://www.pjrc.com/teensy/td_libs_Encoder.html which has an interrupt pins definition so I'll see if I can modify that.
Bill