Got it sorta working. Moved to a different pin and its working well.

(though not sure why you'd think its a code issue if the pot as a voltage divider worked on that pin in question)