1

A few days ago everything was working Ok but now I have 2 errors with Arduino:

  1. IDE error when I open a random sketch. And then that window dies and cant even close it. It says

    Thread -l ... Java.Lang.NullPointerException

    Heres a screenshot: enter image description here

enter image description here

  1. Cant upload my code to the board unless I ran arduino with sudo. (I get "cant find ttyACM0" for example) I didnt need this two days ago. Is there any way I could make it go back to normal?

Thanks! hope someone can help me.

EDIT:

I just downloaded version 1.0.4 and problem #1 is gone. But #2 and #3 still there... And i noticed that when I dont run arduino with sudo, problem #3 is gone. BUt i need sudo to upload my code to the board.

angelatlarge
  • 4,086
  • 2
  • 19
  • 36
fersarr
  • 3,399
  • 3
  • 28
  • 35

2 Answers2

0

I would save your sketches (copy them to a new location, or thumb drive) and either reinstall the arduino software or see if an update is available. Reinstalling/updating should fix it.

Jordan
  • 2,992
  • 2
  • 20
  • 29
  • I just downloaded version 1.0.4 and problem #1 is gone. But #2 and #3 still there... And i noticed that when I dont run arduino with sudo, problem #3 is gone. BUt i need sudo to upload my code to the board. @Jordan – fersarr Mar 21 '13 at 18:31
  • In ubuntu go into the software manager and install all available software updates. See if that helps. – Jordan Mar 21 '13 at 18:32
0

First plug in your Arduino and then on the command line

ls /dev/tty*

To see what devices you have on your system. Check your Arduino IDE's Tools/Serial Port menu: you should have something there. If there is more than one thing, try both.

YOu might also need to change the permissions on the serial port mapped to your Arduino:

sudo chmod 777 /dev/ttyACM0

Where ttyACM0 is the name of your device. Newer versions of Arduino IDE achieve the same effect (though more securely) by adding the current user to the dialout group.

angelatlarge
  • 4,086
  • 2
  • 19
  • 36
  • didn't work :( When trying to upload: Error Opening serial port /dev/ttyACM0 (and my arduino is on ttyACM0) Here is the full error I get when not using sudo to upload http://pastebin.com/4MCQNGDP – fersarr Mar 27 '13 at 19:12
  • Can you paste the results of `ls -lA /dev/ttyACM0` somewhere? – angelatlarge Mar 27 '13 at 19:24
  • yep, here http://pastebin.com/R1MqZ3vY. Sorry about the delay, I couldn't do it before. – fersarr Mar 31 '13 at 03:27
  • Sorry, just to check, you tried 1. plug in Ardiono 2. `sudo chmod 777 /dev/ttyACM0` 3. Running Arduino IDE w/o removing the Arduino, yes? Also try this `sudo usermod -a -G dialout yourUserName`, just to be sure. And then double check that Arduino IDE runs under your username (`ps xau | grep arduino`). – angelatlarge Mar 31 '13 at 04:30
  • no improvements :( Yes I did follow those steps. and about the second part, I think it is runnning under my username : http://pastebin.com/cky0WL6m – fersarr Mar 31 '13 at 05:03
  • Can you check to make sure your serial.download_rate is set to 19200 and serial.debug_rate is set to 9600 in the `~/.arduino/preferences.txt`? – angelatlarge Mar 31 '13 at 05:16
  • I couldnt find serial.download_rate but debug_rate is 9600. I tried adding a line for download_rate but nothing happened , serial.port=COM1 serial.databits=8 serial.stopbits=1 serial.parity=N serial.debug_rate=9600 – fersarr Mar 31 '13 at 05:23
  • Try the `serial.download_rate` to `9600` and to `19200`. Your serial.port should be `/dev/ttyACM0`. Parity, databits, and stop bits look good. Make sure you edit `~/.arduino/preferences.txt` while Arduino IDE isn't running. – angelatlarge Mar 31 '13 at 05:28