Measure battery voltage
You can take advantage of the fact that,


the ATmega32U4 MCU, like many other Atmel MCUs, has an internal bandgap 2.56V voltage reference.
You can measure the output of the bandgap voltage reference while using AVcc (analog power supply voltage) or Aref as the reference for the ADC.
You can now connect Aref (for instance), to the voltage source you want to measure.


For instance, say your battery voltage is 3.05V at a certain moment. If you measure the ADC with the procedure indicated above, you will obtain:

$$
Read Value = \frac{V_{bandgap}}{V_{ref}} 2^{10} = \frac{2.56V}{3.05V} 1024 = 859
$$

In order to obtain the external voltage value you simply have to reverse the above calculation.

The huge benefits of this approach are:


Saves external components. No need to include a resistor voltage divider.
Saves power (current consumption).


The drawbacks:


This will only work for external voltages between the limits of the power supply.
More involved programming, which may eat up some Flash program memory.


Here you can find the essentially same technique nicely and step by step explained for an ATmega48,

http://www.ikalogic.com/avr-monitor-power-supply-voltage-for-free