Multiple timers HELP!

I am having the most horrible time today for some reason and cannot seem to figure this out. I’m at the point I would be willing to pay for assistance. PLEASE HELP!! :slight_smile:

For some reason there with three timers can’t seem to figure out how the heck to get them all to work at “once”. It seems as though when two of them are in the same time range then they all lock up and don’t do anything. I’ve tried varying the timer interval and also the duration of the timer by a couple seconds, when they should be the same, however it never fails they always lock up when two-three of the sliders have a similar timer set.

Your help is appreciated.



#define BLYNK_PRINT Serial
#define PIN 14
#define PIN 12
#define PIN 13

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "";
char pass[] = "";


SimpleTimer timer;
int finishedCycle = 1;
int relayPin = 14; // adjust accordingly
int piezoPin1 = 14;
int piezoPin2 = 12;
int piezoPin3 = 13;
int timerNo1;   // ID of timer to start stop
int timerNo2;   // ID of timer to start stop
int timerNo3;   // ID of timer to start stop
int timerNo4;   // ID of timer to start stop
int timerNo5;   // ID of timer to start stop
int timerNo6;   
int timerNo7;   
int timerNo8;   
int timerNo9;   
int timerNo10; 
int timerNo11;   
int timerNo12;   
int timerNo13;   
int timerNo14;   
int timerNo15;  
int onState = 0; // 1 is On 0 is Off
int onTime1 = 20; // seconds
//9seconds
int offTime1  = 20; // seconds
//22 seconds
int onTime2 = 15;
//12.5
int offTime2 = 15;
//3
int onTime3 = 10;
//2,5
int offTime3 = 10;

int onTime4 = 5;
int offTime4 = 5;
int onTime5 = 1;
int offTime5 = 1;
int onTime5two = 1;
int offTime5two = 1;
int onTime5three = 1;
int offTime5three = 1;
int timerID = 1;
int peizoOn1;
int piezoOn2;
int piezpoOn3;
boolean isOn = false; // toggle flag for relay

/*BLYNK_WRITE(V19) //Refresh finishedCycle from server

{

  finishedCycle = param.asInt(); 
  
}
*/
//first slider test!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BLYNK_WRITE(V6)
{
   finishedCycle = 0;  // Sets cycle as begun
   Blynk.virtualWrite(V19, finishedCycle); //write value to server
   onState = param.asInt();
   if (onState == 1)  
   {
          timer.disable(timerNo1); // Turn off
          timer.disable(timerNo2); // Turn off
          timer.disable(timerNo3); // Turn off
          timer.disable(timerNo4); // Turn off
          timer.disable(timerNo5); // Turn off
       onOffToggler1(); // Turn on
 
   Blynk.virtualWrite(V19, finishedCycle); //write value to server
   
   }
   else if (onState == 2)  
   {
          timer.disable(timerNo1); // Turn off
          timer.disable(timerNo2); // Turn off
          timer.disable(timerNo3); // Turn off
          timer.disable(timerNo4); // Turn off
          timer.disable(timerNo5); // Turn off
          onOffToggler2(); // Turn on

   Blynk.virtualWrite(V19, finishedCycle); //write value to server

   }
   else if (onState == 3)  
   {
          timer.disable(timerNo1); // Turn off
          timer.disable(timerNo2); // Turn off
          timer.disable(timerNo3); // Turn off
          timer.disable(timerNo4); // Turn off
          timer.disable(timerNo5); // Turn off
         onOffToggler3(); // Turn on

   Blynk.virtualWrite(V19, finishedCycle); //write value to server

   }
   else if (onState == 4)  
   {
          timer.disable(timerNo1); // Turn off
          timer.disable(timerNo2); // Turn off
          timer.disable(timerNo3); // Turn off
          timer.disable(timerNo4); // Turn off
          timer.disable(timerNo5); // Turn off
          onOffToggler4(); // Turn on
  
   Blynk.virtualWrite(V19, finishedCycle); //write value to server

   }
   else if (onState == 5)  
   {
          timer.disable(timerNo1); // Turn off
          timer.disable(timerNo2); // Turn off
          timer.disable(timerNo3); // Turn off
          timer.disable(timerNo4); // Turn off
          timer.disable(timerNo5); // Turn off
          onOffToggler5(); // Turn on
   Blynk.virtualWrite(V19, finishedCycle); //write value to server

   }
   else
   {
       timer.disable(timerNo1); // Turn off
       
       timer.disable(timerNo2); // Turn off
       
       timer.disable(timerNo3); // Turn off
       
       timer.disable(timerNo4); // Turn off
       
       timer.disable(timerNo5); // Turn off
       

       digitalWrite(piezoPin1, LOW);
}
}

// Set button to switch mode

// MCU operations
void onOffToggler1()
{   
   timer.deleteTimer(timerNo1);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V19, finishedCycle); //write value to server
       digitalWrite(piezoPin1, HIGH);
       timerNo1 = timer.setInterval(onTime1 * 1000L, onOffToggler1);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V19, finishedCycle); //write value to server
      digitalWrite(piezoPin1, LOW);
      timerNo1 = timer.setInterval(offTime1 * 1000L, onOffToggler1);
      isOn = false;
   }
}
void onOffToggler2()
{   
   timer.deleteTimer(timerNo2);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V19, finishedCycle); //write value to server
       digitalWrite(piezoPin1, HIGH);
       timerNo2 = timer.setInterval(onTime2 * 1000L, onOffToggler2);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V19, finishedCycle); //write value to server
      digitalWrite(piezoPin1, LOW);
      timerNo2 = timer.setInterval(offTime2 * 1000L, onOffToggler2);
      isOn = false;
   }
}

void onOffToggler3()
{   
   timer.deleteTimer(timerNo3);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V19, finishedCycle); //write value to server
       digitalWrite(piezoPin1, HIGH);
       timerNo3 = timer.setInterval(onTime3 * 1000L, onOffToggler3);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V19, finishedCycle); //write value to server
      digitalWrite(piezoPin1, LOW);
      timerNo3 = timer.setInterval(offTime3 * 1000L, onOffToggler3);
      isOn = false;
   }
}

void onOffToggler4()
{   
   timer.deleteTimer(timerNo4);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V19, finishedCycle); //write value to server
       digitalWrite(piezoPin1, HIGH);
       timerNo4 = timer.setInterval(onTime4 * 1000L, onOffToggler4);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V19, finishedCycle); //write value to server
      digitalWrite(piezoPin1, LOW);
      timerNo4 = timer.setInterval(offTime4 * 1000L, onOffToggler4);
      isOn = false;
   }
}

void onOffToggler5()
{   
   timer.deleteTimer(timerNo5);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V19, finishedCycle); //write value to server
       digitalWrite(piezoPin1, HIGH);
       timerNo5 = timer.setInterval(onTime5 * 1000L, onOffToggler5);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V19, finishedCycle); //write value to server
      digitalWrite(piezoPin1, LOW);
      timerNo5 = timer.setInterval(offTime5 * 1000L, onOffToggler5);
      isOn = false;
   }
}


BLYNK_WRITE(V10)
{
   finishedCycle = 0;  // Sets cycle as begun
   Blynk.virtualWrite(V20, finishedCycle); //write value to server
   onState = param.asInt();
   if (onState == 1)  
   {
          timer.disable(timerNo6); // Turn off
          timer.disable(timerNo7); // Turn off
          timer.disable(timerNo8); // Turn off
          timer.disable(timerNo9); // Turn off
          timer.disable(timerNo10); // Turn off
       onOffToggler6(); // Turn on
 
   Blynk.virtualWrite(V20, finishedCycle); //write value to server
   
   }
   else if (onState == 2)  
   {
          timer.disable(timerNo6); // Turn off
          timer.disable(timerNo7); // Turn off
          timer.disable(timerNo8); // Turn off
          timer.disable(timerNo9); // Turn off
          timer.disable(timerNo10); // Turn off
          onOffToggler7(); // Turn on

   Blynk.virtualWrite(V20, finishedCycle); //write value to server

   }
   else if (onState == 3)  
   {
          timer.disable(timerNo6); // Turn off
          timer.disable(timerNo7); // Turn off
          timer.disable(timerNo8); // Turn off
          timer.disable(timerNo9); // Turn off
          timer.disable(timerNo10); // Turn off
         onOffToggler8(); // Turn on

   Blynk.virtualWrite(V20, finishedCycle); //write value to server

   }
   else if (onState == 4)  
   {
          timer.disable(timerNo6); // Turn off
          timer.disable(timerNo7); // Turn off
          timer.disable(timerNo8); // Turn off
          timer.disable(timerNo9); // Turn off
          timer.disable(timerNo10); // Turn off
          onOffToggler9(); // Turn on
  
   Blynk.virtualWrite(V20, finishedCycle); //write value to server

   }
   else if (onState == 5)  
   {
          timer.disable(timerNo6); // Turn off
          timer.disable(timerNo7); // Turn off
          timer.disable(timerNo8); // Turn off
          timer.disable(timerNo9); // Turn off
          timer.disable(timerNo10); // Turn off
          onOffToggler10(); // Turn on
   Blynk.virtualWrite(V20, finishedCycle); //write value to server

   }
   else
   {
       timer.disable(timerNo6); // Turn off
       
       timer.disable(timerNo7); // Turn off
       
       timer.disable(timerNo8); // Turn off
       
       timer.disable(timerNo9); // Turn off
       
       timer.disable(timerNo10); // Turn off
       

       digitalWrite(piezoPin3, LOW);
}
}
// Set button to switch mode

// MCU operations
void onOffToggler6()
{   
   timer.deleteTimer(timerNo6);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V20, finishedCycle); //write value to server
       digitalWrite(piezoPin3, HIGH);
       timerNo6 = timer.setInterval(onTime1 * 1000L, onOffToggler6);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V20, finishedCycle); //write value to server
      digitalWrite(piezoPin3, LOW);
      timerNo6 = timer.setInterval(offTime1 * 1000L, onOffToggler6);
      isOn = false;
   }
}
void onOffToggler7()
{   
   timer.deleteTimer(timerNo7);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V20, finishedCycle); //write value to server
       digitalWrite(piezoPin3, HIGH);
       timerNo7 = timer.setInterval(onTime2 * 1000L, onOffToggler7);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V20, finishedCycle); //write value to server
      digitalWrite(piezoPin3, LOW);
      timerNo7 = timer.setInterval(offTime2 * 1000L, onOffToggler7);
      isOn = false;
   }
}

void onOffToggler8()
{   
   timer.deleteTimer(timerNo8);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V20, finishedCycle); //write value to server
       digitalWrite(piezoPin3, HIGH);
       timerNo8 = timer.setInterval(onTime3 * 1000L, onOffToggler8);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V20, finishedCycle); //write value to server
      digitalWrite(piezoPin3, LOW);
      timerNo8 = timer.setInterval(offTime3 * 1000L, onOffToggler8);
      isOn = false;
   }
}

void onOffToggler9()
{   
   timer.deleteTimer(timerNo9);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V20, finishedCycle); //write value to server
       digitalWrite(piezoPin3, HIGH);
       timerNo9 = timer.setInterval(onTime4 * 1000L, onOffToggler9);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V20, finishedCycle); //write value to server
      digitalWrite(piezoPin3, LOW);
      timerNo9 = timer.setInterval(offTime4 * 1000L, onOffToggler9);
      isOn = false;
   }
}

void onOffToggler10()
{   
   timer.deleteTimer(timerNo5);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V20, finishedCycle); //write value to server
       digitalWrite(piezoPin3, HIGH);
       timerNo10 = timer.setInterval(onTime5two * 1000L, onOffToggler10);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V20, finishedCycle); //write value to server
      digitalWrite(piezoPin3, LOW);
      timerNo10 = timer.setInterval(offTime5two * 1000L, onOffToggler10);
      isOn = false;
   }
}


BLYNK_WRITE(V11)
{
   finishedCycle = 0;  // Sets cycle as begun
   Blynk.virtualWrite(V21, finishedCycle); //write value to server
   onState = param.asInt();
   if (onState == 1)  
   {
          timer.disable(timerNo11); // Turn off
          timer.disable(timerNo12); // Turn off
          timer.disable(timerNo13); // Turn off
          timer.disable(timerNo14); // Turn off
          timer.disable(timerNo15); // Turn off
       onOffToggler11(); // Turn on
 
   Blynk.virtualWrite(V21, finishedCycle); //write value to server
   
   }
   else if (onState == 2)  
   {
          timer.disable(timerNo11); // Turn off
          timer.disable(timerNo12); // Turn off
          timer.disable(timerNo13); // Turn off
          timer.disable(timerNo14); // Turn off
          timer.disable(timerNo15); // Turn off
          onOffToggler12(); // Turn on

   Blynk.virtualWrite(V21, finishedCycle); //write value to server

   }
   else if (onState == 3)  
   {
          timer.disable(timerNo11); // Turn off
          timer.disable(timerNo12); // Turn off
          timer.disable(timerNo13); // Turn off
          timer.disable(timerNo14); // Turn off
          timer.disable(timerNo15); // Turn off
         onOffToggler13(); // Turn on

   Blynk.virtualWrite(V21, finishedCycle); //write value to server

   }
   else if (onState == 4)  
   {
          timer.disable(timerNo11); // Turn off
          timer.disable(timerNo12); // Turn off
          timer.disable(timerNo13); // Turn off
          timer.disable(timerNo14); // Turn off
          timer.disable(timerNo15); // Turn off
          onOffToggler14(); // Turn on
  
   Blynk.virtualWrite(V21, finishedCycle); //write value to server

   }
   else if (onState == 5)  
   {
          timer.disable(timerNo11); // Turn off
          timer.disable(timerNo12); // Turn off
          timer.disable(timerNo13); // Turn off
          timer.disable(timerNo14); // Turn off
          timer.disable(timerNo15); // Turn off
          onOffToggler15(); // Turn on
   Blynk.virtualWrite(V21, finishedCycle); //write value to server

   }
   else
   {
       timer.disable(timerNo11); // Turn off
       
       timer.disable(timerNo12); // Turn off
       
       timer.disable(timerNo13); // Turn off
       
       timer.disable(timerNo14); // Turn off
       
       timer.disable(timerNo15); // Turn off
       

       digitalWrite(piezoPin2, LOW);
}
}
// Set button to switch mode

// MCU operations
void onOffToggler11()
{   
   timer.deleteTimer(timerNo11);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V21, finishedCycle); //write value to server
       digitalWrite(piezoPin2, HIGH);
       timerNo11 = timer.setInterval(onTime1 * 1000L, onOffToggler6);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V21, finishedCycle); //write value to server
      digitalWrite(piezoPin2, LOW);
      timerNo11 = timer.setInterval(offTime1 * 1000L, onOffToggler6);
      isOn = false;
   }
}
void onOffToggler12()
{   
   timer.deleteTimer(timerNo12);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V21, finishedCycle); //write value to server
       digitalWrite(piezoPin2, HIGH);
       timerNo12 = timer.setInterval(onTime2 * 1000L, onOffToggler12);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V21, finishedCycle); //write value to server
      digitalWrite(piezoPin2, LOW);
      timerNo12 = timer.setInterval(offTime2 * 1000L, onOffToggler12);
      isOn = false;
   }
}

void onOffToggler13()
{   
   timer.deleteTimer(timerNo13);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V21, finishedCycle); //write value to server
       digitalWrite(piezoPin2, HIGH);
       timerNo13 = timer.setInterval(onTime3 * 1000L, onOffToggler13);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V21, finishedCycle); //write value to server
      digitalWrite(piezoPin2, LOW);
      timerNo13 = timer.setInterval(offTime3 * 1000L, onOffToggler13);
      isOn = false;
   }
}

void onOffToggler14()
{   
   timer.deleteTimer(timerNo14);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V21, finishedCycle); //write value to server
       digitalWrite(piezoPin2, HIGH);
       timerNo14 = timer.setInterval(onTime4 * 1000L, onOffToggler14);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V21, finishedCycle); //write value to server
      digitalWrite(piezoPin2, LOW);
      timerNo14 = timer.setInterval(offTime4 * 1000L, onOffToggler14);
      isOn = false;
   }
}

void onOffToggler15()
{   
   timer.deleteTimer(timerNo15);
   if (!isOn)
   {
//       finishedCycle++;  // Sets cycle as begun
//       Blynk.virtualWrite(V21, finishedCycle); //write value to server
       digitalWrite(piezoPin2, HIGH);
       timerNo15 = timer.setInterval(onTime5three * 1000L, onOffToggler15);
       isOn = true;
       
   }
   else
   {
//      finishedCycle = 0;  // Sets cycle as begun
 //     Blynk.virtualWrite(V21, finishedCycle); //write value to server
      digitalWrite(piezoPin2, LOW);
      timerNo15 = timer.setInterval(offTime5three * 1000L, onOffToggler15);
      isOn = false;
   }
}











void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
  pinMode(14, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
/**  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  digitalWrite(14,LOW);
  digitalWrite(12,LOW);
  digitalWrite(13,LOW);
 **/ 

   timerNo1 = timer.setInterval(onTime1 * 1000L, onOffToggler1); // Do function every 10 sec, if enabled
   timer.disable(timerNo1); // start disabled
   timerNo2 = timer.setInterval(onTime2 * 1000L, onOffToggler2); // Do function every 10 sec, if enabled
   timer.disable(timerNo2); // start disabled
      timerNo3 = timer.setInterval(onTime3 * 1000L, onOffToggler3); // Do function every 10 sec, if enabled
   timer.disable(timerNo3); // start disabled
      timerNo4 = timer.setInterval(onTime4 * 1000L, onOffToggler4); // Do function every 10 sec, if enabled
   timer.disable(timerNo4); // start disabled
      timerNo5 = timer.setInterval(onTime5 * 1000L, onOffToggler5); // Do function every 10 sec, if enabled
   timer.disable(timerNo5); // start disabled
   // After blynk configs etc make sure that you start off with "off state"
  Blynk.virtualWrite(V0, onState);
    Blynk.virtualWrite(V6, onState);
    Blynk.virtualWrite(V11, onState);
    
    Blynk.virtualWrite(V10, onState);
       timerNo6 = timer.setInterval(onTime1 * 1000L, onOffToggler6); // Do function every 10 sec, if enabled
   timer.disable(timerNo6); // start disabled
   timerNo7 = timer.setInterval(onTime2 * 1000L, onOffToggler7); // Do function every 10 sec, if enabled
   timer.disable(timerNo7); // start disabled
      timerNo8 = timer.setInterval(onTime3 * 1000L, onOffToggler8); // Do function every 10 sec, if enabled
   timer.disable(timerNo8); // start disabled
      timerNo9 = timer.setInterval(onTime4 * 1000L, onOffToggler9); // Do function every 10 sec, if enabled
   timer.disable(timerNo9); // start disabled
      timerNo10 = timer.setInterval(onTime5 * 1000L, onOffToggler10); // Do function every 10 sec, if enabled
   timer.disable(timerNo10); // start disabled
   // After blynk configs etc make sure that you start off with "off state"

          timerNo11 = timer.setInterval(onTime1 * 1000L, onOffToggler11); // Do function every 10 sec, if enabled
   timer.disable(timerNo11); // start disabled
   timerNo12 = timer.setInterval(onTime2 * 1000L, onOffToggler12); // Do function every 10 sec, if enabled
   timer.disable(timerNo12); // start disabled
      timerNo13 = timer.setInterval(onTime3 * 1000L, onOffToggler13); // Do function every 10 sec, if enabled
   timer.disable(timerNo13); // start disabled
      timerNo14 = timer.setInterval(onTime4 * 1000L, onOffToggler14); // Do function every 10 sec, if enabled
   timer.disable(timerNo14); // start disabled
      timerNo15 = timer.setInterval(onTime5 * 1000L, onOffToggler15); // Do function every 10 sec, if enabled
   timer.disable(timerNo15); // start disabled
   // After blynk configs etc make sure that you start off with "off state"


}

void loop()
{
  Blynk.run();
  timer.run();

  
}

cant see much debugging in there?

have you read https://playground.arduino.cc/Code/SimpleTimer#F_getNumTimers

How can we create more debugging?

use serial.print or terminal.print

for example:


  newTemp = temp;
  if (debug == 1)
  {
    Serial.println("newTemp:");
    Serial.println(temp);
    Serial.println("current tempMin:");
    Serial.println(tempMin);
    Serial.println("current tempMax:");
    Serial.println(tempMax);
  }
  if (resetTemps == 1)
  {
    if (debug == 1)
    {
      Serial.println("resetting temps!");
    }
    tempMin = 50;
    tempMax = 0;
  }

  if (tempMin <= newTemp)
  {
    tempMin = tempMin;
    if (debug == 1)
    {
      Serial.println("no change to tempMin ");
    }
  }
  else if (tempMin > newTemp)
  {
    tempMin = newTemp;
    Blynk.virtualWrite(V5, tempMin);
    if (debug == 1)
    {
      Serial.println("tempMin updated");
    }
  }

it tells you where your code is up to…

1 Like

Dave, I will pay you to figure this out for me. I’m so frustrated.

What is your code even attempting to do?

Is it a weird school project?

Lol no I’m creating a prototype! Lmao. You made my day Dave. :slight_smile:

I’m having the same problem with reading a sensor and rtc widget. They only work with some timer values. In others, the sensor doesn’t read

explain better what you need to create and maybe we will help you more precisely…
maybe something like i have this widgets at app… this things connected to this board… at this pins for do this… and the program would do this

you must create a new post for this question, and if you post your code too, maybe you can get a correct answer :wink: