Void loop is non-stop running. how to create start with potentiometer?

Is there a way to start a void loop running after that the potentiometer is set on the highest value? The potentiometer is the start sign of the code. How can i do that?

thnx

When the potentiometer level reaches a trigger point you can call a function that needs to run.

if(analogRead(potPin) >= triggerLevel)
{
//call your function here
}

1 Like

If you want to wait in setup() until the pot value hits maximum and THEN go on to running loop() repeatedly, put this code at the bottom of setup():

  while (analogRead(PotPin) != 1023)
  {
    /* Do Nothing */
  }
} // End of setup()