I'm using an Uno with a sensor and microSD Shield to store data to an SD card. Everything works fine when it is connected to the computer, but when I try to run it with a battery power supply, nothing is written to the card. Also, when I try the same code on an Arduino Mega, everything works fine independent of the computer. Any ideas on why it wouldn't work for the Uno?
Here is the Shield I'm using: