I'm trying to compile a code to arudino pro micro, I have the right option for compiling like the port and the type of the board,but I get an error,I can't copy
2 Answers
This is likely a permission problem. The user likely does not have permission to read from and write to the port created when plugging in the Arduino. This can be temporally fixed using the following command:
sudo chmod 666 /dev/ttyACM0
However, this procedure is only temporary as the port is recreated every time the Arduino is reconnected to the computer. And upon recreation the permissions are reset to their defaults for security reasons.
A better solution is to determine the group which the port belongs to and to add the users expected to access these connected devices to that group.
Plugin and list the port to determine its group:
ls -l /dev/ttyACM*
or
ls -l /dev/ttyUSB*
The group the ports belong to will likely be "dialout". Add the user to that group:
usermod -a -G dialout user_name
...where user_name is replaced by the name of the user who needs access to the port. If you don't know the name of the current user you can use this command:
whoami
Sorry for the late reply,it worked in the ide that I download from the web,apparently ide from the ubuntu software won't work. Thank for the answer
-
It's not the new IDE. It's the setup script that comes bundled with it that issues the
usermod
command suggested by st2000. Jul 15, 2019 at 13:35
include <keyboard.h>
. What your the library using?