...
Below is a sketch. Upload to T4. When SerMon presents Serial it will begin and print. Watch the prints and see the LED blink on output - watch the digit after the @ symbol - it is a counter.
Close SerMon - LED will stop blinking - confirm watching a couple of seconds … no blink [ ON WINDOWS ]
Open SerMon - blinking resumes and the SerMon output picks up where it was when SerMon disconnected.
PROBLEM: T4 blocks sketch execution when Serial.print is used and SerMon goes away. Similar issues when the
setup() { while ( !Serial ); is commented out
Code:
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
while ( !Serial );
}
int ii = 0;
bool flip = true;
void loop() {
if ( !(millis() % 1000) ) {
Serial.print( "123456 @" );
ii++;
Serial.println( ii );
digitalWrite( LED_BUILTIN, flip );
flip = !flip;
delay( 5 );
}
}