Is it safe to connect the battery and use the serial monitor at the same time?

Hello,

I want to see the console output of my robot on the Arduino Serial Monitor. I have a USB cable connecting the Arduino Nano to my laptop but the battery is not switched on right now. I see some text on the serial monitor about the sensors which changes as i move the robot around.

My question: is it possible to safely switch on the battery in order to control the robot during its normal operation while at the same time obtain information on the serial monitor via USB?

But doing this would probably fry the USB port and/or kill the Arduino since it would receive power from the USB port and the battery? It happened to me when i was working on an earlier project and i forgot to unplug the USB cable after uploading the sketch before switching on the battery. RIP Arduino. :( In that case, how to see the serial monitor output when the robot is operational?

Yes you can safely connect USB and external power to Vin or through the barrel jack at the same time.

I don't know what fried your other Arduino...

DVDdoug: Yes you can safely connect USB and external power to Vin or through the barrel jack at the same time.

I don't know what fried your other Arduino...

Is it possible that it destroyed the Arduino because i was uploading a sketch to the Arduino while at the same time leaving it powered through the battery pack? Maybe the Arduino is vulnerable to being powered by an external power source when it is receiving/transmitting data via its RX/TX pins through the USB port?

More likely there's something else wrong. No idea what, just that it's in the part you didn't post (most notably: complete schematic drawing of your project).

It is designed to not have the USB and external power (through the Vin pin) affect one another, it will automatically select one - see Arduino schematics.