 float* readAmp(){
     static float amps[4] = {0,0,0,0};
     #if TEST
-        Serial.println("readAmp");
+        serialOut("readAmp");
         for(int i=0; i<NUM_SOURCES; i++){
             amps[i] = 5.4+i;
         }

// the logging file
File TGC_logfile;

float* readVoltage(){
    static float voltages[4] = {0, 1, 0, 0};
    #if TEST
        Serial.println("readVoltage");
        for(int i=0; i<NUM_SOURCES; i++){
            voltages[i] = 13.8+i;
        }


void error(char mess[]){
    // TO DO
    serialOut(mess);
    digitalWrite(RED_LED_PIN, HIGH);
    delay(500);
    digitalWrite(GREEN_LED_PIN, HIGH);
    delay(500);
}//error

void printArray(float array[], int arraySize){
    for(int i=0; i<arraySize; i++){
        Serial.println(array[i]);
        Serial.flush();
        //delay(SERIAL_DELAY);
    }
}

void serialOut(char output[]){
#if TEST
    Serial.println(output);
    //delay(SERIAL_DELAY);
    Serial.flush();
#endif
    return;
}

void test(){

    char buff[25];
    char *time = buff;

    float *voltages, *amps, *temps;
    voltages = readVoltage();
    amps = readAmp();
    temps = readTemp();
    readTime(time);
    printArray(voltages, 4);
    printArray(amps, 4);
    printArray(temps, 3);
    serialOut(time);
    serialOut("Old filename:");
    serialOut(filename);
    newFile();
    serialOut("New filename:");
    serialOut(filename);
    //delay(100);
    sleep();
    return;
}

void setup() {

    Serial.begin(9600);
    serialOut("");

    pinMode(RED_LED_PIN, OUTPUT);
    pinMode(GREEN_LED_PIN, OUTPUT);
