ACS712 Current sensor and Mega 2560

Hi all, I am new to current sensor and microcontroller. I am working on a project that uses a ACS712 Current sensor to take a reading from a solar panel. The ACS712 will transfer the input signal to a analogue input pin on the Mega 2560. Has anyone used this combo before and able to provide a sample code? I searched google regarding ACS712 and mega 2560 combo, but didn't find a lot of sample code. Any help will be greatly appreciated.

http://arduino.cc/forum/index.php/topic,125280.html ?