Sliding pot does not read anything other than 0 or 1023

I'd check the pot with a multimeter.