What to name a Linux USB port?
in
Integration and Hardware
•
1 year ago
My program works fine in Windows and talks to my Arduino using "COM5" or whatever com port is listed in Windows Device Manager or in the Serial Port menu list in the Arduino IDE. Also in Windows I can use println(Serial.list()); to see a list of ports.
None of this seems to work in Linux (Ubuntu 10.04). The Arduino IDE gives me "/dev/tty/ACM0" as the Arduino USB port but inserting that string in my code (in place of "COM5") doesn't work (String portName = "/dev/tty/ACM0";). Furthermore Serial.list() gives nothing in Ubuntu. The println line executes but outputs nothing. If I try to assign the first available serial port with "String portName = Serial.list()[0];" I get an array out of range error.
Any suggestions? I have searched extensively and don't find much useful about naming USB ports in Processing in Ubuntu. Any help would be much appreciated.
None of this seems to work in Linux (Ubuntu 10.04). The Arduino IDE gives me "/dev/tty/ACM0" as the Arduino USB port but inserting that string in my code (in place of "COM5") doesn't work (String portName = "/dev/tty/ACM0";). Furthermore Serial.list() gives nothing in Ubuntu. The println line executes but outputs nothing. If I try to assign the first available serial port with "String portName = Serial.list()[0];" I get an array out of range error.
Any suggestions? I have searched extensively and don't find much useful about naming USB ports in Processing in Ubuntu. Any help would be much appreciated.
1