I am making a quadrocopter library that uses interrupts to run all of the essential processes (like IMU and motor updates) ‘in the background’. My current issue is that I need a way to reliably capture the incoming serial data from my GPS on Serial1. The GPS data comes in 20 times per second at 115200 bps, but I don’t have a place in my code where I can reliably read the code fast enough.
My first though was using avr usart interrupts, but the arduino serial library already uses them. I can’t modify the existing libraries because I want my code to be portable.
Any ideas would be great.