Can I sense a 110V line directly to analogread(A0)?

Hi every one! my question is simple!

Can I use an arduino to sense a 110V or 220V volts, without risk to it gets burn? has anyone performed a reading like this?

for example:

float ACvoltage;

void setup(){
Serial.begin();
}

void loop(){
ACvoltage=analogRead(A0)*(5.0 / 1023.0);
Serial.println(ACvoltage);
}

thanks in advance!

Can I use an arduino to sense a 110V or 220V volts, without risk to it gets burn?

No. Not directly. The Arduino can only deal with 0 - 5V DC.

Yes you can, with appropriate resistor, according to Atmel. See attached.
I think I’d do that into an optoisolator, and use the open collector output to drive a pin on the arduino.

Atmel AVR182 Zero Cross Detector.pdf (95.1 KB)

That application note is dangerous if you do not know what you are doing it requires the system to be isolated from the mains as it makes direct connection to it.
If you just want to detect the presence of mains voltage then use an opto isolator.