#include <SD.h>
int value = 0;


void setup() {
  Serial.begin(9600);

  analogReference(DEFAULT);

  Serial.print("Initializing SD card...");
  if (!SD.begin(10)) {
    Serial.println("Card failed, or not present");
    return;
  }
  Serial.println("Done.");
}

void loop() {

  value = analogRead(A0);
  
  Serial.println(value);
  
  File dataFile = SD.open("good.txt", FILE_WRITE);

  dataFile.println(value);
  dataFile.close();    
  
  delay(100);
             
}
