Getting the actual values
From SquidBee
Maths to get the values from sensors
Value (in volts) from an analog input is => V (volts) = analogRead(0) * 5 / 1024
[edit]
Humidity sensor
Humidity (%) is => H (%) = 32.25 V - 25.81
H(%) = (analogRead(0) * 5 / 1024.0) * 32.25 - 25.81
that matches:
0.8V => 0%
3.9V => 100% (see picture)
[edit]
Temperature sensor
LM35 Temperature sensor provides 10 mV/ºC
So Temp (ºC) = V (volts) / 0.01
Temp (ºC) = (analogRead(0) * 5 / 1024.0) / 0.01
[edit]
Light sensor
Light sensor is a LDR (Light dependent resistor) connected with a pull-up resistor
For this sensor we have to callibrate with 100% light (aprox.) and dark, I got the next values:
From analogRead =>
dark => 0
100 % light (down an UV lamp) => 950
So I can stimate Light (%) = (100 / 950) * analogRead()



