/Designs/Data_loggers/LuxmetrSD/SW/Arduino/luxmetr/luxmetr.pde
203,7 → 203,7
range=64000;
break;
}
return ((float)range/resolution*ret); // calculate output value
return ((500000.0*range)/(180000.0*resolution)*ret); // calculate output value
}
 
void loop()
212,7 → 212,7
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_RANGE3); //setup sensor for visible measuring
led_blink(); // Delay for measurement
delay(500);
luxVIS=get_light_measurement();
219,7 → 219,7
 
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_RANGE3); // setup sensor for infrared measuring
led_blink(); // Delay for measurement
delay(500);
luxIR=get_light_measurement();