Weather station bugs: rainin to reset after 60 min and other...

This is a rather complicated program for a first programming attempt.

The best approach is to make sure that all the individual parts work correctly (read the rain gauge, etc.) before putting everything together. It is easier to cut out unneeded code than to write new code.

Also, you can put "print" statements at key points to check that the values make sense.

Aside: the following will work "properly" ONLY when tempf = -40 (you are calling a function that expects degrees C, with degrees F):

double dewPoint(double tempf, double humidity)
{
  double A0= 373.15/(273.15 + tempf);
...

The denominator converts Celsius to Kelvin.