White Blocks appearing behind characters

My project displays text just fine and functions as normal, but there are white boxes in all of the spaces where the characters go. This makes it extremely hard to read the text. When I use the usb to power it from my computer, there are no white boxes. When I run it off of the 9v battery, there are white boxes.

Please explain your project in detail.

What display are you using? Show a picture of the display and your wiring. What Arduino board?

Please first learn how to use the Arduino Forum here.

My project is a bomb prop to use for airsoft/paintball gamemodes. I am using a 16x2 lcd. The board is arduino uno. I have attached the schematic and a picture of the screen. As you can see, the screen is barely readable because of this.

Have you tried adjusting the contrast pot? The 5V is probably closer to 5V using the 9V battery than when powered by USB.

How would I do that

I see by your diagram (that is not a schematic) that the contrast pin is grounded. That will give maximum contrast. Usually one wires a potentiometer as a variable resistor to the Vo (pin 3) to adjust contrasts. You could use a fixed resistor as well. Try a 1K resistor from Vo (pin 3) to ground or try different values to get the display that you want.

I would not expect a 9V smoke alarm battery to last very long powering your project.

That worked, thank you! And the batteries have lasted a good duration so far for me. what else would you reccomend?

I would not use pin 1 for the keypad. Pin 1 is the hardware serial TX pin. At some point you may need to use the serial port to print debug information and/or monitor variable values and program flow. Using pin 1 for the keypad will interfere with the serial port.

How to post images so we don't have to download them and everyone can see them.
How to post an image.
Another page on posting images.

Twilks:
And the batteries have lasted a good duration so far for me. what else would you reccomend?

A battery holder with six "AA" cells.