ATmega32U4 uploading problem

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

ATmega32U4 uploading problem

Post by AlwaysHuman »

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.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: ATmega32U4 uploading problem

Post by adafruit_support_mike »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ATmega32U4 uploading problem

Post by adafruit_support_rick »

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?

AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

Post by AlwaysHuman »

I've installed the driver provided here: http://learn.adafruit.com/digital-led-b ... all-driver and I'm using the IDE provided here: http://learn.adafruit.com/digital-led-b ... est-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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ATmega32U4 uploading problem

Post by adafruit_support_rick »

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.

AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

Post by AlwaysHuman »

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!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ATmega32U4 uploading problem

Post by adafruit_support_rick »

NP. Glad you got it working! :D

AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

Post by AlwaysHuman »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ATmega32U4 uploading problem

Post by adafruit_support_rick »

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.

AlwaysHuman
 
Posts: 13
Joined: Thu Mar 21, 2013 3:31 pm

Re: ATmega32U4 uploading problem

Post by AlwaysHuman »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ATmega32U4 uploading problem

Post by adafruit_support_rick »

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.

User avatar
Kim_SJ
 
Posts: 1
Joined: Sun Feb 01, 2015 7:23 pm

Re: ATmega32U4 uploading problem

Post by Kim_SJ »

This could be the Mega 2560 problem with code that contains "!!!". See https://code.google.com/p/arduino/issues/detail?id=392.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”