Hi! I made a social distancing sensor that counts the number of times it beeps in the serial monitor. I want to plug it into a battery pack but when I do that, it disconnects for the serial monitor. Is there any way that I can keep it connected to the serial monitor while still being connected to the battery pack and not my computer?
Maybe your question should be, 'is there a way to display the count when connected to the battery?' To do this, there are several inexpensive numerical displays. try employing one of them. Yes, you will have to modify your program.
You can still use the monitor as you debug using the USB, but the USB is how the monitor gets it information to display.