/Designs/Data_loggers/LuxmetrSD/SW/Arduino/luxmetr/luxmetr.pde
83,8 → 83,9
void led_blink()
{
digitalWrite(3, HIGH); // set the LED on
delay(100);
delay(500);
digitalWrite(3, LOW); // set the LED off
delay(500);
}
 
/*int light_sensor_write( unsigned int data, unsigned int address)
212,16 → 213,14
float luxIR=0;
float time;
 
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_VIS, LIGHT_INTERNAL_16, LIGHT_RANGE1); //setup sensor for visible measuring
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_VIS, LIGHT_INTERNAL_16, LIGHT_RANGE2); //setup sensor for visible measuring
led_blink(); // Delay for measurement
delay(500);
luxVIS=get_light_measurement();
 
time=millis()/1000.0;
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_IR, LIGHT_INTERNAL_16, LIGHT_RANGE1); // setup sensor for infrared measuring
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_IR, LIGHT_INTERNAL_16, LIGHT_RANGE2); // setup sensor for infrared measuring
led_blink(); // Delay for measurement
delay(500);
luxIR=get_light_measurement();
// open the file. note that only one file can be open at a time,
250,7 → 249,6
else {
Serial.print("error opening ");
Serial.println(filename);
}
delay(2000);
}
}