 
 void shutdownPi()
 {
-  shutdown_pi = 1;
+  writeCommand("SHUTDOWN");
 }
 
 void turnLeft(int power)


    // Get other data to send
    String otherData = "none"; // ***** PLACEHOLDER *****
  
    if (shutdown_pi) {
       otherData = "CMD:SHUTDOWN";
    }

    String logMessage = "DATA "
      + String(gps_latitude, 5) + " "

  }
}

// Write a command (to RPi)

void writeCommand(String cmd) {
 
   String cmdMessage = "CMD " + cmd;
   
   // USB debugging
   Serial.println(cmdMessage);
   
   // RPi
   Serial1.println(cmdMessage);
  
}

// Output current status

void writeStatus() {
