Screen command does not stop

This is my first time working with arduino. I have a m5stack attached via USB. The device already has some code flashed into it.
Based on a tutorial I am trying to screen the device using the command as root
screen /dev/ttyUSB0 115200
This results in an endless output from the device which is the current code flashed on it.
I can't get it to stop so that I can get the python shell on the device.
I also trying running a hello world program on it using arduino IDE but I get a timeout waiting for packet header. Any resources that I can go through will be greatly appreciated. Thank you.

Did you terminate the screen process before trying the upload via the Arduino IDE?

Only one application can have a serial port open at a time. So if you have it open in screen, then that will cause the uploads to fail because the upload tool can't open the port. This doesn't happen with the Arduino IDE's Serial Monitor because the IDE is able to control the Serial Monitor to automatically close the port before starting the upload, then open it again once the upload is finished.

I'm not sure if many people are familiar with the m5stack.

  1. Is it https://m5stack.com/?
  2. Tt's not that we don't want to help, but they have their own forum where you have a better chance for better help; https://community.m5stack.com/

It might be useful to provide an URL for the tutorial so we get a better understanding of what you're trying to do.