Arduino Mega 2560 ground pin short-circuiting?

llamamama:
oh, WOW! that was stupid! and very simple! thank you so much.

Can u tell me the code that you used? The example codes that come with arduino ide, which uses pots, doesn't work with my mega, the one named ReadAnalogVoltage, the output at SerialMonitor is always 5v or 1023.