 /*
  * Serial:  Serial Monitor through USB
- * Serial1: GPS and LOGGER 
+ * Serial1: GPS
  * Serial2: RF IN/OUT
  */
 #include <TimeLib.h>

  char lastChar;
  while(Serial2.available()){
    lastChar = Serial2.read();
    if( lastChar == 10 && msgIn != "" ){ //if I get a new line
      Serial.print( "RX " );digitalClockDisplay( now() );
      Serial.println( msgIn );
      int rcvdNum = (int)msgIn.substring(1 + msgIn.indexOf(' ')).toInt();
      boolean ok = false;
      if (rcvdNum == numb-1){
        ok = true;
      }
      //altSerial.print(msgIn.substring(1 + msgIn.indexOf(' ')) + "#"+(String)(numb-1));
      //Serial.print(msgIn.substring(1 + msgIn.indexOf(' ')) + "#"+(String)(numb-1));//for logging
      if(ok){
        //altSerial.println(" ok");
        //Serial.println(" ok");//for logging
      }else{
        //altSerial.println("-not ok");//the space is important here
        //Serial.println("-not ok");//for logging
      }
      msgIn = "";
    }else{
      msgIn += lastChar;

void printDigits(int digits){
  // utility function for digital clock display: prints preceding colon and leading 0
  Serial.print(":");
  if(digits < 10) Serial.print('0');
  Serial.print(digits);
}