Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: RTC Interrupt

Home Forums Mayfly Data Logger RTC Interrupt Reply To: RTC Interrupt

#1548
Shannon Hicks
Participant

The Mayfly has 3 hardware interrupts, D2, D3, and D10. Since the first two are part of the serial UART, that only leaves D10 as the only available hardware interrupt. On the Mayfly v0.3 board, the RTC is connect to A7, so you have to use a “pin change interrupt” library to handle an interrupt from something other than one of the hardware pins. This can also be helpful if you’re looking for a trigger signal on any input pin.

The SODAQ pin change interrupt library works great for this: https://github.com/SodaqMoja/Sodaq_PcInt

You can also read more information about how SODAQ handles the interrupts on the Mbili, which is similar to the Mayfly. http://support.sodaq.com/interrupts/

I’m working on some sample Mayfly code for handling the pin change interrupts, I can hopefully post it soon, but the SODAQ links should help you in the meantime.