Newby needs serial monitor/com port brief tutorial

I'm for fortunate to have an older Mega 2650 and a new 101. The Mega came pre-setup on Com 3 and the 101 on Com 4. Sketches using the serial monitor run just fine and display appropriately with the Mega. Not so with the 101, but I'm not surprised.

I like the fact that both boards don't share the same Com port. Is there a way to change the serial monitor in the IDE to either point to Com 3 or Com 4 depending on what board I plug in?

Of course, I could change the 101 to Com 3 as well, but I want to both understand and have control over what is happening.

Just to note, I'm running Win 10 and IDE 1.6.8. I can see the Mega and 101 ports in the Device Manager.

Thank in advance.

vdolcourt:
Is there a way to change the serial monitor in the IDE to either point to Com 3 or Com 4 depending on what board I plug in?

No, you have to manually change the IDE's setting.

Happy to do that. I don't need it to be automatic. Can you please point me to where in the IDE I make that change?

Thank you in advance!

Tools -> Port

I did that previously. Here is what I see:

  • Mega board shows Com 3
  • 101 shows Com 4

Whenever I run a sketch that uses Serial for the 101 I get something like Port not found, but maybe it is another warning. My assumption is that the IDE serial monitor is "permanently" set for Com 3.

If I change the port on the IDE, does that change the port setting on the 101 board? If the answer is "NO" then what governs the port setting on the 101 board? If I want to change the 101's port, what do I do? Can you point me to the process or briefly outline it for me, please?

Thank you.

Looks like another example of the XYProblem.

vdolcourt:
Whenever I run a sketch that uses Serial for the 101 I get something like Port not found, but maybe it is another warning.

This is what you need to fix.

vdolcourt:
My assumption is that the IDE serial monitor is "permanently" set for Com 3.

You've made a very incorrect assumption. The Serial Monitor is set to whatever Port is Selected in the Port Menu.

vdolcourt:
If I change the port on the IDE, does that change the port setting on the 101 board?

This question doesn't make sense to me. The port select tells the IDE what COM Port to use. It doesn't "change" anything on the boards itself.

If you're unable to open the serial monitor when the board is attached and the correct port is selected, then THAT's the problem you need to troubleshoot.

vdolcourt:
If I change the port on the IDE, does that change the port setting on the 101 board? If the answer is "NO" then what governs the port setting on the 101 board? If I want to change the 101's port, what do I do? Can you point me to the process or briefly outline it for me, please?

Thank you.

The computer operating system (eg. Windows) governs the COM port number.

The computer operating, such as "Windows" automatically assigns a COM port number to the board/device. So under windows 'device manager', we can usually see what number COM port was automatically given/assigned to the arduino board. It is like the arduino is a customer, and the operating system chooses a number, and says to the arduino "this is the number you get for this session".

So.... when you use the Arduino Sketch software, the PORT number that you choose needs to match the COM port number that Windows had dished out (handed out) to that particular arduino board.

If you disconnect the arduino board from the computer (ie. disconnect USB), and plug it in again (via USB), it's possible that the arduino board will be re-assigned the same COM port number. But that's not always the case.

It is kind of like plugging in a USB stick into a computer. The computer might assign 'J drive' or 'I drive' or 'H drive' etc. And if you plug in yet another USB stick, then this second USB stick will get assigned a drive letter too. It's also similar to computers getting automatically assigned an internet address (IP address) if 'DHCP' mode is used.

Thank you everyone. This makes sense to me now. Thank you for the help. - Vic