/Designs/Data_loggers/LuxmetrSD/SW/Arduino/luxmetr/luxmetr.pde
17,7 → 17,7
#include <stdlib.h>
#include <SD.h>
 
#define chipSelect 10 //PB2
#define chipSelect 4
 
#define address 0x44 // A0 = L
 
65,7 → 65,7
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
while(true);
return;
}
Serial.println("card initialized.");
Serial.print("searching for files...");
203,7 → 203,7
range=64000;
break;
}
return ((500000.0*range)/(510000.0*resolution)*ret); // calculate output value
return ((500000.0*range)/(180000.0*resolution)*ret); // calculate output value
}
 
void loop()
250,7 → 250,6
else {
Serial.print("error opening ");
Serial.println(filename);
while(true);
}
delay(2000);
}