Skip to main content
added 8 characters in body
Source Link
Juraj
  • 18.2k
  • 4
  • 30
  • 49

You do something like this

unsigned long timerMesurement = 0;

void loop()
{
  Ifif (millis() - timerMesurement > 5UL ) { 
    timerMesurement = millis(); 
  auto  int measurement = analogRead(A0); 
  }
}

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(); 
    int measurement = analogRead(A0); 
  }
}
Source Link
Sigma
  • 296
  • 4
  • 13

You do something like this

unsigned long timerMesurement = 0;

void loop()
{
  If(millis() - timerMesurement > 5UL ){ 
  timerMesurement = millis(); 
  auto measurement = analogRead(A0); 
  }
}