Serial Monitor with Arduino Due shows a "Heartbeat"

I have this distilled to a simple program that echoes Serial port data back to the Serial Monitor (but as hex instead of ascii). It works just fine on the Uno:

unsigned char InpBuff[64];

void setup() {
  Serial.begin(9600);
  }

void loop(){
  if(Serial.available()>0) {
    InpBuff[0]=Serial.read();
    Serial.print(InpBuff[0], HEX);
    } 
  }

On the Due I get this:


But, strangely enough, each character comes about 1 second apart (not measured exactly). If you type some text and press ctrl-enter, that echoes just fine.
I no longer have IDE 1 to compare this to, but I am hypothesizing that IDE 2.0 is improperly "pinging" the Serial Port on the Due in a manner that causes this to happen, because this works perfectly on the Uno.
EDIT: I forgot to mention that it is the Programming port on the Due that I am using.

Thanks @weshowe. This bug is tracked by the IDE developers here:

Thanks. I've only seen it on the Due, not the mega or others. I use a crude parser in my development code to tune values, but I "patched" around this by filtering out chars with 0x80 bit set.
Still, it's ugly. :face_with_symbols_over_mouth:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.