     int n=0;                                // Count loops around print routine
     int i=0;
     boolean transBegin = false;
+    boolean downloadBegin = false;
+    
     for(;;)
     {
       //~~~~~~~~~~~~~~~~~~~~~~~Create simulation data for now~~~~~~~~~~~~~~~~~~~~~~~~~~~


//===================================Library Includes====================================
#include <EEPROM.h>

//=====================================Definitions=======================================
#define dataSetLength 6
#define EEPROM_TIMEBASE_ADDR 0

//===================================Program Settings====================================
boolean mockMode = false;                    //  Defines which mode of operation to use.
                                            //    - True denotes Mock Data Mode
                                            //    - False denotes Data Acquistion Mode

boolean sendConfigInfo = true;             //  This is an option to send an initial
                                            //  set of configuration settings, giving
                                            //  the plotting program more information
                                            //  on what data it is handling.

int configUpdateLimit = 10;                //  If config info strings are enabled,
                                           //  sets the maximum time elapsed before
                                           //  program should send an config update.

boolean retainTimeReference = false;        //  This option reads and writes each time 
                                           //  base value to EEPROM on each loop to
                                           //  determine whether a reset has occured.
                                           //  If reset occurs, then the stored value
                                           //  is added to the newly generated execution
                                           //  time.
                                           
boolean xbeeMode = true;                  //  This condition determines whether Xbees
                                           //  are being used. Usually this would be
                                           //  true, except for testing without the
                                           //  Xbee.

int sigNum = 6;                           //  This allows quick changes to be made to
                                           //  the number of signals when in mock mode,
                                           //  which helps with testing transmission 
                                           //  capacity.

    Serial.println("OK received. Configuration complete");
    
  }
  
  //~~~~~~~~~~~~~~~~~~~~~~~Send Initial Configuration Information~~~~~~~~~~~~~~~~~~~~~~~~
  sendConfigString();
}

//=================================Main Program Loop=====================================
void loop() {
  float timeElapsed = 0;
  float addedTime = 0;
  int n = 0;
  File myFile;
  
  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SD Card Implementation~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  if(SDMode)                              //  SD only needs to be initialized if SD is being
  {                                       //  used. Otherwise, initialization will fail.
    pinMode(10, OUTPUT);
    
    if (!SD.begin(4)) {
      Serial.println("initialization failed!");
      return;
    }
    
    if(SD.exists("data.txt")){
      SD.remove("data.txt");
    }
        
    myFile = SD.open("data.txt", FILE_WRITE);
  }
  
  //~~~~~~~~~~~~~~~~~~~~~~~~~~~Generate and Transmit Mock Data~~~~~~~~~~~~~~~~~~~~~~~~~~~
  if(mockMode)                              //  Enters mock data transmission mode
  {
    int ramp = 0; 
