BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Reset value


#1

And know you about a simple code for set value to 0 every day or hours…? Thanks


#2

#3

The Timer Widget should do the trick simply, otherwise you can search this forum for info on how to use the Time Input Widget for more complex needs. And probably hundreds of ways with various RTC methods and Arduino code floating around Googleland.


#4

Ok thank. I found this:


void resetvalues()
{

powercount2 = 0;

}

But i dont know how use it. I must change only powercount2? THanks.


#5

That’s not a timer… that is just a simple function that sets a variable to a predetermined value.


#6

Ok but i wont every hours set value maxKmh to 0…


#7
timer.setInterval(3600000L, resetvalues); //every hour

void resetvalues()
{

powercount2 = 0;

}

#8

Ok. Thanks. I used it and working it good. But now i find a simply code for show up and down arrow for actualy temperature and showing it on my nextion screen…THanks. :thinking: