Arduino only works when connected to USB

That is weird. Do you have another wall wart? We often see where a project will not work when no longer connected to the PC USB power due to a weak battery, but a wall wart is always the sure fire solution so I am mystified. One thing to check is how many amps the circuit needs, the PC can supply a lit more than the 1A wall wart, try to find a 2A or more.