POTENTIOMETER SENSOR AND BUTTON

If you want a responsive program use IF rather than WHILE

Have a look at the code in Several Things at a Time for the usual way to use millis().

...R