Go Down

Topic: Newbie is stuck -Java.Lang.NullPointerException (Read 2893 times) previous topic - next topic

CliffS

Hi,

I'm a novice, so I'll appreciate any help!

Trying to hook an Arduino Mega board to a Windows XP (SP3) computer through USB.

First program:  Blink

Arduino Sketch version 0018
Using FDDI USB connection on COM11.
Correctly selected Arduino Mega on Board menu
Correctly selected COM11 on Port menu

This error happens:
Java.lang.nullpointerException
at processing.app.debug.AvrdudeUploader.getProgrammerCommands(AvrdudUploader.java:9
7)

and then a *lot* of other java errors.  I'm too inexperienced to figure out how to copy/paste all the errors from Sketch. (

Other errors include:
Exceptin in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:52

Nothing gets uploaded.

About a year ago, I used something called AVRDude when trying to get a Pololu robot to work.  Perhaps this is some leftover code conflict?  If so, is there any way for both programs to coexist on my computer?  

Thanks to all,
-Cliff

CliffS

Still have same problem.

I have removed all files from the old Pololu AVR installation, and removed all files with AVRDude in their titles.  Still have the same errors.  Nothing uploads.

Is AVRDude used for a normal (novice-level, introductory) Arduino environment?  

CliffS

Still no luck.  Very frustrating.

The target board is a brand-new ATMega board.

I see something about having to burn a bootloader.  
As a novice, this seems mysterious.

I clicked on "Burn Bootloader".  And then "AVR ISP".  Then got these errors:
avrdude:  stk500_getsnch(): not in synch:  resp 0x00
avrdude: stk500_disable() protocol error expect 0x4 resp 0x51

More mystery.

Can anyone help?  Am I doing anything right???

CliffS

Continued Mystery:

 According to the Arduina Mega documentation, "The ATmega1280 on the Arduino Mega comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer"

 So I'm guessing that I do not need to burn a bootloader onto this.  

 Can anyone comment on my assumption?  

 When I open the "SERIAL MONITOR TOOL" and type gibberish into the "Send" window, the little green RX LED blinks on the Arduino Mega board.  So apparently, there *is* communication between my windows machine and the arduino.  

 But I still get the same original error message when I try to upload the unmodified BLINK program:  java.lang.nullpointerexception at processing.app.debug.avrdudeuploader.getprogrammercommands(avrduduploader.java:97) followed by a lot more bumpf that I can't type.
And the little green RX led does not blink when I try to upload this program, suggesting that nothing is being uploaded to the Arduina mega board.

 Is this the normal frustration for using an Arduino project?

CliffS

Well I solved the problem:

The preferences file had
  upload.using=bootloader
I changed it to
  upload.using=avrispv2

and now things work.  Easy?  Yes.  Obvious?  Yes, now that I've spent several hours on it.  Sigh...

Perhaps a more experienced forum member can edit the Arduino Troubleshooting page to include under the "Why I can't upload my programs to the Arduino board?"
...
 * If you see strange Java Null Pointer exceptions, try erasing your preferences file and restoring the Arduino software.

Warm cheers to all,
-Cliff

Go Up