I have a sketch where I use several devices:
SoftwareSerial nmeaSourceA(13, 12);
On a first version I only had the GPS and the LCD and everything works fine.
With the time I verified that GPS Heading was not update correctly and I thought join it a COMPASS.
In a new sketch I made several experiences with the Compass: Calibrating (matrix and Bias) and made a lot of tests etc, etc. Works fine.
Later I joined the two sketches and it works but the this new sketch I noticed an erratic behavior:
sometimes works several iterations, sometimes works One iteration. After a few times the program stops.
Perhaps I have any Library incompatibility?
Must I Begin and End library’s each time I need them? (Wire.h has a Serial.begin but no Serial.end)
Do I need another Arduino and separate the Compass from the rest?
Please give me your opinion