AnalogRead on Mega not responding

pinMode() sets only the digital state and is useless in analog.

But are you 100% sure, after all the mixing, you use the same pin in hardware as you do in software?