Programs doesn't work when arduino is not conected to PC

Hello, I have a problem with arduino, i don't know what. It worked well before.
My robot is composed from an Arduino Uno board. I upload the program and it works. But when i disconnect the robot from pc it stops working. I've change the batteries with new ones but it still doesn' work. I don't know what could be the problem. I uploaded the Blink example , and it works. The led conected to pin 13 blinks. But when i disconnect the board from pc, the led fades out untill off, then fades back in, and remains on, but it doesn't blink. So I suppose the problem is not with my programs, and, the green led is on. Any program that i upload works only when the board is connected to pc. What could be the problem? Anyone can help me?

How are you powering the Uno when you unplug the USB cable?
If You are using a 9 volt battery, forget it.
Most 9 volt batteries have less current then the USB port.
Servos and motors are power hungry.

3 batteries 1,5V AA . So, the problem should be with the batteries? It matters what kind of batteries I use? The robot worked before the old batteries died....

If you are powering the servos off the Uno, 6xAA alkaline batteries supplying 9V, that should be OK to power everything. Your Arduino has a 5V voltage regulator, and will work happily with an input voltage of 7-12V into the power jack.

Note that if you are using rechargable batteries, they are only 1.2V each. So 6 x 1.2 = 7.2V, which is still enough for your needs.

Thanks a lot, you saved my day:D I didn't noticed that I had 6 batteries before. I changed only 3. After reading your posts I searched the robot for other batteries.Those was hided in backward. So, the problem was indeed the batteries.....