Sounds like you may not be getting a valid value for the pot input. How have you wired it up? Inserting some timely and well positioned serial print statements might tell you something.
I think it is wired correctly. One pin of the pot is connected to 5V and, the other to Ground and the central is connected to A0.
I'm getting the input and output values with serial print so I'm 100% sure the pot is being read correctly.
Are you running the sketch exactly as shown in that page you linked to?
What external hardware have you got connected?
What behaviour are you expecting to see if it works correctly?
1.- Yes, I'm running the very same sketch.
2.- No external hardware is connected.
3.- I would be expecting a value of 1.96V on the pin3
To be honest I don't think this code is correct because the error is always the same. Has anyone got this code to work correctly?