 
 //This is for the 16x2 LCD
 //Most of them are using this
-//LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
+LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
 //Some use this PCF8574
-LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
-
-//this is for RTC
-int clockAddress = 0x68;  // This is the I2C address
-int command = 0;  // This is the command char, in ascii form, sent from the serial port     
-long previousMillis = 0;  // will store last time Temp was updated
-byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
-
-byte decToBcd(byte val)
-{
-  return ( (val/10*16) + (val%10) );
-}
-
-// Convert binary coded decimal to normal decimal numbers
-byte bcdToDec(byte val)
-{
-  return ( (val/16*10) + (val%16) );
-}
-
-// Gets the date and time from the ds1307 and prints result
-char* getDateDs1307(int flag) {
-  //if flag == 0 : date output
-  //if flag == 1 : time output
-  // Reset the register pointer
-  Wire.beginTransmission(clockAddress);
-  Wire.write(byte(0x00));
-  Wire.endTransmission();
-
-  Wire.requestFrom(clockAddress, 7);
-
-  // A few of these need masks because certain bits are control bits
-  second     = bcdToDec(Wire.read() & 0x7f);
-  minute     = bcdToDec(Wire.read());
-
-  // Need to change this if 12 hour am/pm
-  hour       = bcdToDec(Wire.read() & 0x3f);  
-  dayOfWeek  = bcdToDec(Wire.read());
-  dayOfMonth = bcdToDec(Wire.read());
-  month      = bcdToDec(Wire.read());
-  year       = bcdToDec(Wire.read());
-
-  char sza[32];
-  if (flag==0)
-    sprintf(sza, "%02d-%02d-%02d",year,month,dayOfMonth);
-  if (flag==1)
-    sprintf(sza, "%02d:%02d:%02d",hour,minute,second);
-  return(sza);
-}
-//end of RTC
+//LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
+
+////this is for RTC
+//int clockAddress = 0x68;  // This is the I2C address
+//int command = 0;  // This is the command char, in ascii form, sent from the serial port     
+//long previousMillis = 0;  // will store last time Temp was updated
+//byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
+//
+//byte decToBcd(byte val)
+//{
+//  return ( (val/10*16) + (val%10) );
+//}
+//
+//// Convert binary coded decimal to normal decimal numbers
+//byte bcdToDec(byte val)
+//{
+//  return ( (val/16*10) + (val%16) );
+//}
+//
+//// Gets the date and time from the ds1307 and prints result
+//char* getDateDs1307(int flag) {
+//  //if flag == 0 : date output
+//  //if flag == 1 : time output
+//  // Reset the register pointer
+//  Wire.beginTransmission(clockAddress);
+//  Wire.write(byte(0x00));
+//  Wire.endTransmission();
+//
+//  Wire.requestFrom(clockAddress, 7);
+//
+//  // A few of these need masks because certain bits are control bits
+//  second     = bcdToDec(Wire.read() & 0x7f);
+//  minute     = bcdToDec(Wire.read());
+//
+//  // Need to change this if 12 hour am/pm
+//  hour       = bcdToDec(Wire.read() & 0x3f);  
+//  dayOfWeek  = bcdToDec(Wire.read());
+//  dayOfMonth = bcdToDec(Wire.read());
+//  month      = bcdToDec(Wire.read());
+//  year       = bcdToDec(Wire.read());
+//
+//  char sza[32];
+//  if (flag==0)
+//    sprintf(sza, "%02d-%02d-%02d",year,month,dayOfMonth);
+//  if (flag==1)
+//    sprintf(sza, "%02d:%02d:%02d",hour,minute,second);
+//  return(sza);
+//}
+////end of RTC
 
 
 TinyGPSPlus gps;

const byte GPS_PWRCTL = 6; //Pulling this pin low puts GPS to sleep but maintains RTC and RAM
//For Arduino Uno Only
//const byte STAT1 = 7;
const byte STAT2 = 8;

// analog I/O pins

  // Each threshold is the midpoint between adjacent headings. The output is degrees for that ADC reading.
  // Note that these are not in compass degree order! See Weather Meters datasheet for more information.

  if (adc < 380) return (113);//NOT WORKING
  else if (adc < 393) return (68);//NOT WORKING
  else if (adc < 414) return (90);//NOT WORKING
  else if (adc < 456) return (90);//(158);//E is 90 degrees CW from North = 0
  else if (adc < 508) return (135);//SE is 135 degrees CW from North = 0
  else if (adc < 551) return (180);//(203);//S is 180 degrees CW from North = 0
  else if (adc < 615) return (45);//(180);//NE is 45 degrees CW from North = 0
  else if (adc < 680) return (23);//NOT WORKING
  else if (adc < 746) return (225);//(45);//SW is 225 degrees CW from North = 0
  else if (adc < 801) return (248);//NOT WORKING
  else if (adc < 833) return (0);//(225);//N is 0 degrees CW from North = 0
  else if (adc < 878) return (338);//NOT WORKING
  else if (adc < 913) return (325);//(0);//NW is 325 degrees CW from North = 0
  else if (adc < 940) return (293);//NOT WORKING
  else if (adc < 967) return (270);//(315);//W is 270 degrees CW from North = 0
  else if (adc < 990) return (270);//NOT WORKING
  else return (-1); // error, disconnected?
}


