battery 9V

Have you followed the play ground?

Arduino Playground - HomePage

As James C4S has already pointed out 9V batteries are hopeless, check the links in my signature to see why, especially given that the OP is running motors, shields and who knows what else.

Duane B

rcarduino.blogspot.com