I am trying to write a main code that calls the RC and GPS sample codes from AP libraries. However, I am only able to print on the Serial Monitor one of them at a time. Can someone give any ideas how I can merge the classes and methods in one main code that, when compiled, will give me both results in one window without the other one crashing.
I am trying to write a main code that calls the RC and GPS sample codes from AP libraries.
Links to the libraries? Where is your code?
However, I am only able to print on the Serial Monitor one of them at a time.
Why?
Can someone give any ideas how I can merge the classes and methods in one main code that, when compiled, will give me both results in one window without the other one crashing.
Sure. Write good code. We'll be happy to review it, and point out potential issues. What Arduino are you using? How are you reading from two devices at the same time?
This is the main code that calls the Sample Codes in the APM library for GPS and RC. The reason why we can't print is because somehow when you call the loopServo () and loopGPS () in the same time, it chooses to run only one and it prints only the values for one.