Reading input from potentiometer

Yes, thank you, that is what I need.

Unfortunately, maybe the other that answered had my solution but I can't put the code all together. Can anyone give me a done project so that atleast I can simulate and test it.

Once again, thank you all for your answers.