Closed slalaure closed 8 years ago
In case of a totally dark night, the code will hang, because ch1 will be =0 and in the function read visibleLux() the code "if (ch0 / ch1 < 2 && ch0 > 4900)" will fail : div by 0 ... I suggest putting this code just above if(ch1 == 0) { return 0; }
Hi @slalaure , thanks for reporting, already patched your code.
In case of a totally dark night, the code will hang, because ch1 will be =0 and in the function read visibleLux() the code "if (ch0 / ch1 < 2 && ch0 > 4900)" will fail : div by 0 ... I suggest putting this code just above if(ch1 == 0) { return 0; }