Kod: Zaznacz cały
//*****************************OPADY_DESZCZ*******************************************
double get_rain(int channelNumber, double t) {
t = rainrate; ----------------------########### CZEMU TEGO NIE CZYTA Z VOID COUNT ??????????????????????
}
//**********************************WYLICZ OPADY****************************************
void count() {
// Grab the current ms count for common calculations
unsigned long curtime = millis();
// Make sure we don't record bounces
if ((curtime - tiptime) < interval) {
return;
}
// How long since the last tip?
unsigned long tipcount = curtime - tiptime;
tiptime = curtime;
// Calculate mm/hr from period between cup tips
double rainrate = 914400.0 / tipcount;
Serial.print("Cup tip: ");
Serial.print(tipcount);
Serial.println("ms");
Serial.print("Opady deszczu: ");
Serial.print(rainrate/10);
Serial.println("l/m2");
Serial.println("mm/h");
}