well, as @Bibhas says, your problem is that /dev/ttyACM0
is having the wrong permissions, and that has nothing to do with Arduino or sublime text. It's the linux kernel who creates character devices per default with no user permissions.
But good thing is that it can be changed!
The fast and easy solution is to add your current user to the dialout
group:
sudo adduser YOU dialout
where YOU is your username and then log out and log back in to have those new permissions propagated into your shells.
Hint:
There's a solution that is a bit more complicated, is to create a udev rule such as:
/etc/udev/rules.d/48-arduino.rules
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="arduino_end"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", MODE="660", GROUP="arduino", SYMLINK+="arduino.leonardo"
LABEL="arduino_end"
which creates a /dev/arduino
device readable and writable by the arduino group, that you need to create (or you can use the default dialout
group which is perfectly fine):
addgroup arduino
adduser YOU arduino
and then reload your rules:
sudo udevadm control --reload-rules
The nice thing about that second hint is that when you unplug replug your arduino, you won't have it change device number oddly, it will be kept to the name. If you're not using an arduino leonardo, you can check your device idvendor/idproduct using lsusb:
% lsusb
… ↓↓↓↓ ↓↓↓↓
Bus 006 Device 105: ID 2341:0036 Arduino SA
…
HTH
sudo
? Permission denied means it might need admin permission. – Bibhas Debnath Jun 6 '13 at 6:02sudo
to deal with permissions issues is VERY MUCH THE WRONG SOLUTION. That is akin to fixing an issue with the tires on your car by setting it on fire, and pretending it was like that when you found it. The OP needs to properly fix the permissions issue, not just plaster over it with a security hole. – Fake Name Jan 15 '14 at 11:08