I am using an arduino uno to attempt to create an automonous drone. The main issue I am having is with the different serial protocols and using multiple serial ports. I have to read 2 seperate signals and output 1 signal. The input and output is S-BUS format at 100000bps which is a strange baud rate to me. I have gotton it to read and output these types of signals properly. The other input is to read a DJI naza gps signal by tapping one of the lines, this signal uses a standard 115200 bps rate. Again I was able to get this to work succesfully.
One of my main problems is to run everything together. I mainly want to run multiple loops at the same time, two loops reading and saving information as global variables while the main loop uses those stored values to do things. I do not believe it is possible to do this in one loop because the serial ports could be recieving data at the same time or the arduino takes too long doing a task and overflows occur. I just want a gurenteed way of being able to recieve and store those signals into global arrays.
I am using an i2c lcd library, dji naza gps library, alternative software serial library(because I believe the dji naza gps library interferes normal software serial), and a library to read the sbus signal.
I am using 2 seperate transister inverters on the sbus inputs and outputs.
My main goal is to run 2 or more loops at the same time