How to create a program that controls the speed of a servo using a potentiometer using arduino?

thanks. but when I tried to simulate it in tinkerpad. this one pops outimage