I'm trying to connect my Arduino to my RPi through python and PySerial, and I'm using the following code:
import serial ser = serial.Serial('/dev/serial/ttyACM0', 9600)
and I was getting an issue along the lines of the program not being able to open the COM port due to a permission issue
Traceback(Most recent call last): File "<pyshell#2>", line 1, in <module> ser = serial.Serial('/dev/ttyACM0', 9600) File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 260, in___init__ self.open() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 276, in open raise SerialException("could not open port %s: %s* % (self._port, msg)) SerialException: could not open port /dev/ttyACM0: [Errno 13] Permission denied:'/dev/ttyACM0'
So according to this question I substituted the /dev/ttyACM0 to what I found in /dev/serial/by-id. That turned out to be the id
and now I am receiving the same error in the python program, which seemed to work for the asker in the previous question.