diff --git a/send_and_blink/send_and_blink.ino b/send_and_blink/send_and_blink.ino index 97ef913..7d89f49 100644 --- a/send_and_blink/send_and_blink.ino +++ b/send_and_blink/send_and_blink.ino @@ -115,9 +115,12 @@ int readLoudness() return analogRead(LOUDNESS_SENSOR); } -int readLight() +float readLight() { - return analogRead(LIGHT_SENSOR) / 1000; + int sensorValue = analogRead(LIGHT_SENSOR); + return (float)(1023-sensorValue)*10/sensorValue; + // Not a great value +// return analogRead(LIGHT_SENSOR) / 1000; } void setupWater() {