Drobna uwaga, w kodzie masz:
Code: Select all
void ReadMail(){
int newstatus = digitalRead(mail_sensor);
if (((newstatus == HIGH) ? "1" : "0")) {
status = newstatus;
}
else if (--retries == 0) {
status = newstatus;
}
SP("STAN_SKRZYNKI: "); SP(newstatus);
}
(newstatus == HIGH) ? "1" : "0" <- zwróci do ifa "1" lub "0" w postaci ciągu znaków. Oba warianty zostaną potratkowane jako TRUE.
