Return raw light value

This commit is contained in:
Nico Schottelius 2016-09-17 04:54:09 +02:00
parent 7e05829dcd
commit 2015ca59b1
1 changed files with 2 additions and 3 deletions

View File

@ -115,10 +115,9 @@ int readLoudness()
return analogRead(LOUDNESS_SENSOR); return analogRead(LOUDNESS_SENSOR);
} }
float readLight() int readLight()
{ {
int sensorValue = analogRead(LIGHT_SENSOR); return analogRead(LIGHT_SENSOR);
return (float)(1023-sensorValue)*10/sensorValue;
} }
void setupWater() { void setupWater() {