     //Serial.print(F("databuffer: ")); Serial.println(dataBuffer);
     //Serial.print(F("timestampbuffer: ")); Serial.println(timestampBuffer);
     archive = archiveRRD.log(&dataBuffer[0],&timestampBuffer[0], &dataBuffer[0], &timestampBuffer[0]);
-    Serial.print(F("freeMemory()="));Serial.println(freeMemory());
+    //Serial.print(F("freeMemory()="));Serial.println(freeMemory());
      if (archive){
-   archiveRRD2.log(&dataBuffer[0],&timestampBuffer[0]); 
-  }
-  }
-
-  
-  Serial.print(F("freeMemory()="));Serial.println(freeMemory());
-   
+       archiveRRD2.log(&dataBuffer[0],&timestampBuffer[0],&dataBuffer[0],&timestampBuffer[0]); 
+     }
+  }
+
+  
+  //Serial.print(F("freeMemory()="));Serial.println(freeMemory());
+  
    myFile2 = SD.open("testArc2.txt");
   if(myFile2){
     while (myFile2.available()) {

char dataBuffer[3];
char timestampBuffer[19]; 

int average(int intArray[], int length)
{
    int total = 0;

#include <RRDSD.h>
#include <Time.h>
#include <SD.h>
//#include <MemoryFree.h>
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>

File myFile;
File myFile1;
