Knowing how to find your device’s port is essential to programming a microcontroller.
Skip to the section below that matches your operating system.
On your keyboard, press and hold the Windows key, then press R to open run menu. Type “devmgmt.msc” in the text field and click “Ok” to open device manager.
Locate entry labeled “Ports (COM & LPT)”. Expand the entry by clicking on the small arrow to the left of the text. Take note of the items that currently there.
Now, plug in your device. You should see a new item appear. Followed by “(COMX)”, where “X” is a integer. This “COMX” is the name of your port.
Open a terminal. In the terminal enter ls /dev/tty*.
Now plug in your device and again enter ls /dev/tty*. The full path to the new item that appears is the port of your device. For example, if “ttyUSB0” appears, then the port of the device is “/dev/ttyUSB0”.
Using spotlight search enter “terminal” and open the terminal application. In the terminal type ls /dev.