arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.13k stars 7k forks source link

Error Uploading #11978

Closed bparanj closed 4 weeks ago

bparanj commented 4 weeks ago

When I upload the code to Arduino nano I get a permission error on Ubuntu 24.

Code:

void setup() {
  // put your setup code here, to run once:
  pinMode(2, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH);
}

Error:

Sketch uses 724 bytes (2%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
Failed uploading: uploading error: exit status 1

If I open the IDE with sudo command, the IDE has just a blank screen. It is not opening the program file. How to resolve this error?

matthijskooijman commented 4 weeks ago

https://support.arduino.cc/hc/en-us/articles/360016495679-Fix-port-access-on-Linux