//Designs/Data_loggers/LuxmetrSD/SW/Arduino/luxmetr/luxmetr.pde
83,9 → 83,8
void led_blink()
{
digitalWrite(3, HIGH); // set the LED on
delay(500);
delay(100);
digitalWrite(3, LOW); // set the LED off
delay(500);
}
 
/*int light_sensor_write( unsigned int data, unsigned int address)
213,14 → 212,16
float luxIR=0;
float time;
 
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_VIS, LIGHT_INTERNAL_16, LIGHT_RANGE2); //setup sensor for visible measuring
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_VIS, LIGHT_INTERNAL_16, LIGHT_RANGE1); //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_RANGE2); // setup sensor for infrared measuring
set_light_sensor(LIGHT_ENABLE, LIGHT_ONETIME, LIGHT_SENSE_IR, LIGHT_INTERNAL_16, LIGHT_RANGE1); // 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,5 → 251,6
Serial.print("error opening ");
Serial.println(filename);
}
delay(2000);
}