fixed light

light sensor range now 0 to 100, and removed useless old formulae
This commit is contained in:
shadow00 2016-09-17 10:19:37 +02:00 committed by GitHub
parent a024adadd0
commit d32f7a05ca

View file

@ -127,14 +127,7 @@ int readLoudness()
int readLight() int readLight()
{ {
int sensorValue = analogRead(LIGHT_SENSOR); int sensorValue = analogRead(LIGHT_SENSOR);
//return sensorValue;
return map(sensorValue, 11, 27333, 0, 413); return map(sensorValue, 11, 27333, 0, 413);
// return (float)(sensorValue)*10/sensorValue;
// return (float)(1023-sensorValue)*10/sensorValue;
// Not a great value
// return analogRead(LIGHT_SENSOR) / 1000;
} }
void setupWater() { void setupWater() {