analogRead range

Hello! I'm triying to run a simple potenciometer analog read program with arduino uno and arduino Mega 2560.

I have no problems with the UNO, full resistance=0 and no resistance=1023 reading values

But, with the Mega, same code same pins...full resistance=130 and no resistance=800 reading values.

Why?? Thank you very much for your help guys!

Is it the same potentiometer? Sounds like something isn't wired right.

johnwasser:
Is it the same potentiometer? Sounds like something isn't wired right.

Same potentiomenter and everything wired the same.

I've tried again and now works perfectly in both boards... Nothing changed... :S

Well, now works so problem SOLVED. Thank you John!