You do something like this
unsigned long timerMesurement = 0;
void loop()
{
If(millis() - timerMesurement > 5UL ){
timerMesurement = millis();
auto measurement = analogRead(A0);
}
}
You do something like this
unsigned long timerMesurement = 0;
void loop()
{
If(millis() - timerMesurement > 5UL ){
timerMesurement = millis();
auto measurement = analogRead(A0);
}
}