Portenta and the Regular Arduino IDE Serial Monitor

Is this the normal Arduino behaviour that the serial monitor only works after a program has been uploaded?

It seems to me if I plug in the Portenta (I think this also happens with the Nano 33 IOT) using the regular IDE on Windows and I find the correct port and load the serial monitor nothing shows, however if I upload the program everything works fine.

On Ubuntu it is fairly easy to run to get the serial monitor up and running.

ls -l /dev/ttyACM*
screen /dev/ttyACM0

There is some confusing ctrl-a then :quit enter to get out of the program but I just close the terminal

By the way I am not a big fan of the following line of code, which shows up in most example programs as it blocks the running program and causes lots of frustration for my students, especially when running wifi or BLE and connecting the device to a generic power supply

while (!Serial) {}

Speaking of USB power supply connections, anyone else having a few issues with the Portenta when it is away from the computer USB connection?

Seems to run slightly differently I often get a flashing Green LED for no apparent reason. Especially if I use a USB hub connected to a wall wart and several devices powered by it.

jerteach,

I do something like the following on a lot of the sketches I work on if I don't want them to hang on one of the serial ports and other devices...:

do {
counter++;
delay(1);
} while ( !(Serial.available()) && ( counter < SERIAL_CTR_TIME_OUT) );
counter = 0;

You can #define values to be something you're comfortable with.

If the device is restarted - sometimes under windows you may have to restart the serial monitor tool.

The Portenta H7 is sensitive to power in the respect if you have a powered USB hub it needs to be delivering rated power or the Portenta could work erractically.

A decent hub is here - has a handy power switch too.

Regards,
John

1 Like

jwestmoreland:
do {
counter++;
delay(1);
} while ( !(Serial.available()) && ( counter_lum < SERIAL_CTR_TIME_OUT) );
counter = 0;

You can #define values to be something you're comfortable with.

Regards,
John

As always great suggestions. The above code is a real win, win

No problem jerteach! :slight_smile: