In your example you used ADCIN 1,pote to read GP1. Change it to ADCIN 5,pote. Sure you'll need to change your hardware and some regisers settings as well.

Next step will be to use a TIMER interrupt instead.