MKR1000 doesn't work with 3.7V LiPo battery

@ both of you LOL..

Make sure you don't have the WHILE SERIAL statement enabled in the sketch that neither of you posted.

To jenz removing the USB connection will also reset the serial port and I think that might be what you are seeing. Unfortunately I don't think there is a way around that.