Potentiometer not working smooth

please post the definition for this function

why is this needed?