I've been having problems with a recent project of mine to do with the serial port. Basically, the way the project works is the Arduino writes to serial port /dev/ttyACM0 and then a rust program reads from that serial port and does something based on that.
The problem is, whenever I plug the Arduino UNO into my computer, it can't start writing to the serial port and the rust program can't start reading from it instantly because when it's plugged in and the serial port is created, I don't get read/write permissions to it straight away. I have to run sudo chmod a+wr /dev/ttyACM0 then upload the code again and run the rust program again.
I've tried adding myself to the group that has permissions for ttyACM0, which is "uucp" and chowning the whole /dev/ folder but nothing has worked.
Yep thats what I said i've tried. I ran ls -l /dev/ttyACM0 and it gave me crw-rw-rw- 1 root uucp 166, 0 Oct 2 18:33 /dev/ttyACM0 meaning the group is uucp. I added myself to uucp and it still isn't working. /etc/groups shows that I am in the uucp group.
Ah sorry thats my bad I just tested and I don't need to reupload the code after running chmod, just rerun the rust script. But for reference anyway I'm running archlinux kernal version 6.5.5