Goodnight
First of all sorry for my ignorance.
Esp8266 board.
My project sends temperature and humidity data to two virtual pins.
all right. What I intend to count cold hours based on the temperature parameter. The cold hours are counted when the temperature is less than 30 degrees. The temperature reading is done every 5 minutes. I have a switch, if it is one, it activates the hour counter. I call the functions after Blynk.begin. The only part of the code that doesn’t work is this. Where is the problem ? Thank you
int contarsi;
int contador;
float horafrio;
BLYNK_WRITE(V4)
{
contador = param.asInt();
}
BLYNK_WRITE(V3)
{
contarsi = param.asInt();
}
void hour(void) {
if (contarsi = 1){
if (T >= 30) {
contador += 1;
horafrio = (contador * 5) / 60;
Blynk.virtualWrite(V5, horafrio);
Blynk.virtualWrite(V4, contador);
}
}
}