Help! usb avr programmer error

I try to program an Atmega328p on AVR Arduino 4.18 with " usb isp programmer". It’s my first time using avr studio. I have programmed one HEX file. It shows success. But when I press the power button on the pololu 3pi robot, the LCD flash across and the power is shut down. I repeat this process. It is same. I don’t know why. So I try to program again. But when I insert the usb isp progrmammer in my computer, the green USB LED is on, the yellow LED is off, and the red LED is blinking, and a message in avrstudio 4 states ISP mode error and suggests lowering the speed. It also show:

Getting isp parameter… SD=0x03 … OKOK
Reading FLASH input file… OK
Entering programming mode… FAILED!
Leaving programming mode… OK!

I can not program again. Please help me.

Hello.

You cannot program your 3pi when it is not powered, so the first thing to address is why the 3pi is turning itself off. One possible explanation would be low batteries. Have you charged them recently?

- Ben

Thank you very much! It is indeed because of the low batteries. I have solved this problem. You are great.

I’m glad that the problem was so easy to fix. I strongly recommend you pay close attention to your battery voltage in the future, because the 3pi can be permanently damaged if it loses power in the middle of programming!

- Ben