Determining AC voltage value

For my project I need to measure the value of ac voltage and then take action accordingly if it is low voltage or high voltage. Normal Input voltage is 230 V, 50Hz. How to measure the voltage using Arduino uno? Please explain in detail if possible along with codes.

Check this one out http://openenergymonitor.org/emon/buildingblocks/measuring-voltage-with-an-acac-power-adapter

or this one http://openenergymonitor.org/emon/node/58

kavan:
For my project I need to measure the value of ac voltage and then take action accordingly if it is low voltage or high voltage.
Normal Input voltage is 230 V, 50Hz. How to measure the voltage using Arduino uno? Please explain in detail if possible along with codes.

So you want us to do your project for you? What is the name of your supervisor?

I am new to the programming world so a bit of guidance would help me out. Sir, If you are willing I can provide the contact details of my supervisor. :)

Your supervisor should be arrested for asking some one so inexperienced to work with such a high voltage. Supervisors have a "duty of care".

This seems like a nutty project for a beginner. As in, deadly.

Please explain in detail if possible along with codes.

I for one am not going to provide "codes" that will facilitate your killing yourself. Learn to program. There are thousands of web pages about C and C++. Learn about electronics. Read the warnings about how dangerous mains voltage is.

Thanks for the help!!! Done with measuring voltage and now left with current measurement. For measuring current can I use ACS 712 Sensor module? Is it compatible with Uno?