LowPowerLab Forum

Hardware support => Moteino => Topic started by: bgreene on April 03, 2015, 09:34:23 AM

Title: encoder.h with moteino mega wont work
Post by: bgreene on April 03, 2015, 09:34:23 AM
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
Title: Re: encoder.h with moteino mega wont work
Post by: Felix on April 04, 2015, 08:36:25 PM
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.
Title: Re: encoder.h with moteino mega wont work
Post by: bgreene on April 05, 2015, 07:52:25 AM
Thanks Felix, I'm using https://www.pjrc.com/teensy/td_libs_Encoder.html (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