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:
I wrongly thought the USB wifi device I use for my mouse would suffice to give me a COM output from Processing.
I still to not get a list of all the possible ports… maybe this is a way for the OS (WIN11) to save memory or cycles… and when I am in the Arduino IDE, this COM3 shows as COM5… so there is could some OS magic involved.
PS C:\Users\newuser> mode
Status for device COM3:
-----------------------
Baud: 19200
Parity: None
Data Bits: 8
Stop Bits: 1
Timeout: OFF
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit: ON
RTS circuit: ON
Status for device CON:
----------------------
Lines: 30
Columns: 120
Keyboard rate: 31
Keyboard delay: 1
Code page: 437
Python is beyond the scope of my brain… sorry.
Thank you for all the help. Here is my second sketch (first = helloworld.pde, of course) which I was tinkering with in my long absence, learning primative shapes by displaying the shape inside a given boundary (stroke width, shape, diameter do not cause boundary overlap)
This “random shapes inside the adjustable grid” exercise was to learn how to place an object anywhere on a given-size screen (or portion of the screen), so when I get the comms between Arduino and Processing working, I can present the data in graphical form.