Arduino won't run well on 9v battery
Small rectangular 9V batteries are absolutely lousy power sources.  They have a very small current load capability.  They are specifically designed for low-current long-term draw.

For example, here is a link to an Energizer Datasheet:
http://data.energizer.com/PDFs/522.pdf

Notice on the first page that more than 25mA of load significantly reduces the usable life of the battery.

On the second page, graph on the right, you can see that 100mA will drop the life to a couple of hours.

Why is this critical?  Because an Arduino board by itself, when powered through Vin, draws on the order of 30-40mA.  This is before you connect anything else to it.  So the battery is barely usable to power just the board.

Get a better power source.