Mega using rfm69HCW and attachinterrupt()

Started by Physwiz, June 03, 2019, 01:49:48 PM

Physwiz

Hi,
Definitely a newbie here. I'd be very grateful for help with two questions -
a) Before I part with £, can I just check that, because of limited hardware interrupts on the Moteino (two, I think), I need a MoteinoMEGA if I am going to use a transceiver PLUS two momentary switches using hardware interrupts?
b)I am porting Arduino Uno code to Moteino-world. I understand Arduino Uno / Moteino use the Atmega 328P and the MoteinoMEGA uses the ATMega1284P. Will my Uno sketches, including libraries, work on the MoteinoMEGA and how will the Moteino-to-MoteinoMEGA interoperability be??

Thanks in advance,

Al.

Felix

If you HAVE to use hardware interrupts, then yes you'd need 3 in total, which the MoteinoMEGA has available (1 for radio, 2 free).
Otherwise you can use pinchange interrupts, search the forum for "pinchange" for several threads where this is discussed.
Otherwise Arduino -> Moteino/MoteinoMEGA interoperability should be pretty straight forward, minding the pin changes and any voltage level shifting required to/from 5V devices (if any applies).

Physwiz

Thanks Felix,
I'll look up pinchange interrupts and get myself a Mega.
Regards,
Al.