   Serial.begin(9600);
 #endif
 
-/*REMOVE
-  // set pin 4 (POWA) to output so that we can control the
-  //power of the sd reader and the temp sensor
-  pinMode(POWA, OUTPUT);
-  // turn on SD card and temp sensor 
-  digitalWrite(POWA, HIGH);
-*/
-
   //set up sd card
   sd_setup();
 

#include "TrueRandom.h" //https://github.com/sirleech/TrueRandom

//debug settings
#define DEBUG 0 //turn off when unnecessary to preserve power
#define DEBUG_TO_SD 0

//sd card variables
#define POWA 4    // pin 4 supplies power to microSD card breakout and temp sensor

    // take a number of analog samples and add them up
    while (sample_count < NUM_VOLTAGE_SAMPLES) {
        sum += analogRead(A3);
        /*REMOVE*/
#if DEBUG_TO_SD
        write_Text_To_Disk("sum = "+String(sum)+"\n");
#endif
#if DEBUG       
        Serial.println("sum = "+String(sum)+"\n");
#endif
        sample_count++;
        delay(10);
    }
    // use 5.0 for a 5.0V ADC reference voltage
    // 5.015V is the calibrated reference voltage
    voltage = ((float)sum / (float)NUM_VOLTAGE_SAMPLES * 5) / 1024.0;
    sample_count = 0;
    sum = 0;
    voltage *= 11;
    // send voltage for display on Serial Monitor
    // voltage multiplied by 11 when using voltage divider that
    // divides by 11. 11.132 is the calibrated voltage divide
    // value
#if DEBUG
    Serial.print(voltage);
    Serial.println (" V");
#endif    
 
