USE UPS NEXT DAY AIR FOR ANY USA ORDER BEFORE 11AM ET *TODAY* 12/19/2014 TO GET YOUR PACKAGE IN TIME FOR XMAS - PLEASE SEE OUR SHIPPING DEADLINE NOTICE FOR MORE DETAILS!

ATmega32U4 uploading problem
Moderators: adafruit_support_bill, adafruit

ATmega32U4 uploading problem

by AlwaysHuman on Fri Mar 29, 2013 3:36 pm

Hey, new here

I recently bought the LED belt kit from adafruit and have had some trouble uploading the sketch to the board. The code compiles just fine but whenever it get to the uploading I get one of these two errors:

avrdude: ser_open(): can't open device "\\.\COM4": Access is denied.

OR

avrdude.exe: ser_open(): can’t open device “\.COM4″: The system cannot find the file specified.

It does this when I attempt to reset the board before uploading. If I don't reset the board, the IDE just hangs on the "Uploading to I/O board" message. I'm running on Windows 7, if that means anything.
AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

by adafruit_support_mike on Fri Mar 29, 2013 7:03 pm

It looks like the OS is having trouble finding the driver that allows the computer to talk to the microcontroller.

I'm a Mac/unix guy, so I'm afraid I can't offer you much beyond that, but I'll send one of the folks who knows Windows over to help.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm

Re: ATmega32U4 uploading problem

by adafruit_support_rick on Fri Mar 29, 2013 7:48 pm

Have you installed the Arduino driver?
What COM port is assigned to your arduino? It must not be COM 4. Have you selected the proper serial port in the Arduino IDE?

adafruit_support_rick
 
Posts: 14496
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: ATmega32U4 uploading problem

by AlwaysHuman on Fri Mar 29, 2013 11:37 pm

I've installed the driver provided here: http://learn.adafruit.com/digital-led-belt/install-driver and I'm using the IDE provided here: http://learn.adafruit.com/digital-led-belt/upload-the-test-sketch

Device manager has the board listed listed as COM4.

To give a more in depth description, when I click upload, the IDE hangs on "Binary sketch size: 4102 bytes (of a 28672 byte maximum)
". Then once I click upload once more, I get the access denied message.
AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

by adafruit_support_rick on Sat Mar 30, 2013 11:33 am

Are you pressing the reset button immediately after you click 'Upload'? This board is a little different than a regular Arduino - the bootloader only runs for 5-10 seconds after a reset, and you have to start the upload within that time. The green "boot" LED will pulse while the bootloader is active.

adafruit_support_rick
 
Posts: 14496
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: ATmega32U4 uploading problem

by AlwaysHuman on Sat Mar 30, 2013 7:40 pm

Doing that seems to be working! I was unaware of the very short bootloader sequence, I'll just have to time it properly from now on.


Thank you very much!
AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

by adafruit_support_rick on Sat Mar 30, 2013 9:55 pm

NP. Glad you got it working! :D

adafruit_support_rick
 
Posts: 14496
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: ATmega32U4 uploading problem

by AlwaysHuman on Sun Mar 31, 2013 12:22 am

aaaaaaaand it's back to not working no matter what order I push the reset button in.

Does it help that windows is making the noise it makes when you unplug a device whenever I push reset?
AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

by adafruit_support_rick on Sun Mar 31, 2013 11:18 am

AlwaysHuman wrote:Does it help that windows is making the noise it makes when you unplug a device whenever I push reset?

It will do that. You'll get the unplug and plug noises in quick succession when you press the button, and then again when the bootloader times out.

So, the question is, are you hearing both sounds when you press reset? You should hear four sounds in all - two when you press reset and two when it times out.

If so, then Windows is recognizing the bootloader properly.
First of all, check Device Manager to make sure that you've still got the right COM port set in the Arduino IDE.

If that all looks right, then go into the preferences menu of the Arduino IDE. You'll see a checkbox to enable verbose output on upload. Check that, and then post whatever shows up when you try to upload.

adafruit_support_rick
 
Posts: 14496
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: ATmega32U4 uploading problem

by AlwaysHuman on Sun Mar 31, 2013 1:58 pm

This weird teensy hybrid version of the IDE doesn't seem to have the option for verbose output, but after taking in to account what you said about the sounds and doing some tweaking, I think I've got it figured out.

In rapid succession:
-Click upload
-Hold down reset button until the disconnect sound plays
-Immediately let go, at which point the reconnect sound should play
-It should then end with the disconnect sound playing one last time

My problem was that I was quickly clicking the reset button and I guess it didn't have time to reconnect because I was only getting two disconnect noises.Doing this exactly seems to be working continuously, hopefully it won't decide to quit on me again later.

Just one last question: This is my first ever arduino project and therefor my first time using a board. Are all boards I come in contact with going to be this finicky with the timing?
AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

by adafruit_support_rick on Sun Mar 31, 2013 2:52 pm

AlwaysHuman wrote:Just one last question: This is my first ever arduino project and therefor my first time using a board. Are all boards I come in contact with going to be this finicky with the timing?

Other Arduinos support an automatic reset on upload. You don't have to press any buttons or anything when you upload to them. This board is a little different.

adafruit_support_rick
 
Posts: 14496
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY