Problem with Serial Monitor in Arduino IDE

Status
Not open for further replies.

PickyBiker

Well-known member
The Serial Monitor is showing the Teensy 4.0 as "offline" after uploading the sketch into an existing Serial Monitor. If a new Serial Monitor is started after uploading, everything works okay. But when the code is uploaded again the Serial Monitor shows "offline" again. To resolve the problem, I just exit the serial monitor and restart it. Obviously this makes troubleshooting code a bit annoying.

Here is the environment:
Windows 10 PC
Teensy 4.0
Arduino IDE 1.8.13

How can I resolve this?

Code:
void setup()
{
  Serial.begin(9600);

}

void loop()
{
  Serial.println("Hello");
  delay(1000);
}
 
What version of TeensyDuino is installed?

I've seen this in the past - but not recently - and I generally use TyCommander for Upload and Serial Monitor now.

Wondering if this chnage to setup() changes anything:
Code:
void setup()
{
  Serial.begin(9600);
  while ( !Serial && millis()<2000 );

}
 
In Tools > Ports, you should see Teensy twice. Try both. Does one work but not the other? (and if so, which...)

Also, try setting Tools > USB Type to any of the non-Serial options, like MIDI or RawHID. Then after uploading, select the HID interface in Tools > Ports. That way uses a completely different Windows driver. Maybe it will be better (or different)?
 
Defragster nailed it. If "COM10 (Teensy)" is chosen, it fails every time but if "COM10 Serial (Teensy 4.0)" is chosen, it works every time.

Thanks Defragster!
 
Glad to hear it is working! Though that was Paul's insight to use the alternate port where one is handled by IDE SerMon and the other by PJRC's custom code.
 
Status
Not open for further replies.
Back
Top