Hi
I have built this weather station, see web site
but I can't get rain to show it real value.
When the sensor (hl-83) is completely dry, it shows a very high value in% should preferably be 0% as it does not rain
Hi
I have built this weather station, see web site
but I can't get rain to show it real value.
When the sensor (hl-83) is completely dry, it shows a very high value in% should preferably be 0% as it does not rain
A brief look at the code on that site tells me that you may be seeing the raw ADC reading.
Take a reading when it's totally dry and another when it's really wet then change the code where it reads the ADC to something like this:
int valueWet = wwww;
int valueDry = dddd;
int rain = analogRead(rainPin);
rain = map(rain, valueDry, valueWet, 0, 100);
rain = constrain(rain, 0, 100);
map function map() - Arduino Reference
constrain function constrain() - Arduino Reference