 
 void setup()
 {
-  pinMode(PIN_PAYLOAD, OUTPUT);
+  pinMode(PIN_TEST, OUTPUT);
   
   //Make sure Serial baud matches hardware config
   Serial1.begin(57600); //XBee baud rate

  if (Serial1.available()) {
    byte receivedPayload = Serial1.read();
    switch (receivedPayload) {
      case FLAG_PAYLOAD:
        if ( digitalRead(PIN_PAYLOAD) == HIGH )
          digitalWrite(PIN_PAYLOAD,LOW);
        else digitalWrite(PIN_PAYLOAD,HIGH);
        break;
      default:
        digitalWrite(PIN_PAYLOAD,LOW);
        break;
    }
    #ifdef readDebug

#define FLAG_GPS_FIX 0b00000001
#define FLAG_PAYLOAD 0b00000010

//directives received from ground station
//make sure these match on the sending end
#define DIR_TEST 0xAB
#define DIR_PAYLOAD 0xACDIR_TEST

#define PIN_TEST 13

//Payload variables
#define MAX_BUF 16  // Maximum payload size 
