Terminal long string disconnection issue

stick to 2 lines of code in loop() until you known what you are doing, see PUSH DATA example for calling functions at times intervals.