Voltage measurement on Analog PIN

tauro0221:
Hi,
Try setting the pin as an input. Like pinMode(pin,INPUT).

No that makes no difference at all, the analogRead call dose that for you.

Try this for a sensor