Return raw value of light

This commit is contained in:
Nico Schottelius 2016-09-17 07:56:11 +02:00
parent 1a76d9d070
commit 43185ec1a8
1 changed files with 2 additions and 1 deletions

View File

@ -127,6 +127,8 @@ int readLight()
{
int sensorValue = analogRead(LIGHT_SENSOR);
return sensorValue;
return map(sensorValue, 1000, 200000, 1, 100);
// return (float)(sensorValue)*10/sensorValue;
// return (float)(1023-sensorValue)*10/sensorValue;
@ -138,7 +140,6 @@ void setupWater() {
pinMode(WATER_SENSOR, INPUT);
}
boolean hasWater()
{
if(digitalRead(WATER_SENSOR) == LOW) {