millis() - change period on the fly

Hi there

I am sending data to Ubidots dashboard every 5 min. and I would like to take a look at the data let said in real time or 5 seg. using a switch widget on the dashboard.

Which would be the approach to do that using :

if ( (topLoop - lastValues) >= sendvalues)

{ lastValues = topLoop;

f1()
f2()

}

What would be the issue if I declare "sendValues" as a variable and not a constant value?

Thank you very much for some help.

Sorry, but the bit of code you've posted makes no sense out of context. One would need to see the entire code to understand what those few lines actually mean.

What would be the issue if I declare "sendValues" as a variable and not a constant value?

None.

@PaulS
Thank you for the answer.