I have two USB ports available, and both work with other hardware not related to Processing (mouse, USB printer, USB memory, battery tester, audio player, Arduino, ESP). Using this sketch, I expected to see both ports, but see nothing in the “console” or “errors” windows of the Processing IDE.
The Reference Page for Serial.list() says to use println();, so I tried that, too, but the same results: nothing in the command line. I copied the command line and pasted it into the IDE as well as Notepad (hoping for inverse color text) but that only showed ten, empty, CRLF.
I tried searching the forum, but found nothing pointing me to my error, for example, did I neglect to configure my IDE for using Serial or import a library?
@newuser What operating system (including version) and CPU architecture (x86/ARM) is your system using ?
Have you double checked the serial ports show up correctly using the OS/terminal ?
(This would help isolate the issue (e.g. is with Processing or with the OS (e.g. permissions to access serial devices, etc.))
Have you double checked the serial ports show up correctly using the OS/terminal ?
Good idea; on a mac you would type ls /dev/tty/.* on the command line in Terminal if you don’t already know.
I was not connecting the dots right away when you said terminal since I mostly use Windows and not used Linux in a while. Was thinking of old school HyperTerminal as the “terminal software\emulator” for connecting to COM ports.
All is clear now for Windows environment:
I have a brand new W11 PC and slowly migrating over to it.
Windows Terminal does not connect to a COM port but I can use everything from my last post easily enough!
Great work providing detailed steps with images: this will be super helpful for other users as well!
FWIW, when doing basic serial tests (e.g. outside of Processing) I used CoolTerm:
it has executables for multiple operating systems
you can scan/check ports of course
once connected, you can send messages (Ctrl/CMD + T) and see the output, but also switch between ASCII and bytes (HEX view) which super useful when debugging binary serial protocols.
(Alternatively, if Python is an option PySerial’s python -m serial.tools.list_ports is handy (and the grep option can be handy to get consistent ports using Vendor ID (VID) and Product ID (PID) info on OSes where the name of the port may change))
Terminology can be challenging, especially for users who are new to this environment.
Reference:
The description may not be clear for a new user.
The “text window” should be the *console" which is a panel at the bottom of the PDE (Processing Development Environment) which is also referred to as the Processing IDE (Integrated Development Environment).
Code to display to console and display/sketch/output window: