/Designs/Data_loggers/LuxmetrSD/SW/Arduino/luxmetr/luxmetr.pde
19,7 → 19,6
 
#define chipSelect 4
 
 
#define address 0x44 // A0 = L
#define SENSE_VIS 0
#define SENSE_IR 1
151,20 → 150,6
return (1000.0/pow(2.0,16)*ret);
}
 
char *ftoa(char *a, double f, int precision)
{
long p[] = {0,10,100,1000,10000,100000,1000000,10000000,100000000};
char *ret = a;
long heiltal = (long)f;
itoa(heiltal, a, 10);
while (*a != '\0') a++;
*a++ = '.';
long desimal = abs((long)((f - heiltal) * p[precision]));
itoa(desimal, a, 10);
return ret;
}
 
void loop()
{
float luxVIS=0;