Battery Monitor

Depends on the battery. For most batteries you can just read the voltage from them to get a pretty good idea as to how flat they are.

If you measure the voltage over a period of time (while you flatten the battery) then you can work out the curve and the rough capacity at certain voltages.
To measure the voltage of the battery, assuming it's a 5v arduino, you can simply attach the + to an analog input pin and the - to Gnd and then use analog read (value*4.888) to get the voltage of the battery.

Mowcius