Softwareserial.h Library !!link!! -

void checkForData(SoftwareSerial &ss) ss.listen(); if (ss.available()) // Process

// Periodically check Bluetooth (non-blocking) if (bluetooth.available()) char cmd = bluetooth.read(); if (cmd == 'G') gps.listen(); // Switch back to GPS softwareserial.h library

port1.listen(); // Switch back

void loop() if (port1.available()) // Process port1 data void checkForData(SoftwareSerial &ss) ss