Programming LedBlinky Belt

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
cytochromec
 
Posts: 7
Joined: Tue Apr 01, 2014 2:08 pm

Programming LedBlinky Belt

Post by cytochromec »

Hello,
I got the test to download to the BlinkyBelt fine a few months, but now I want to change the program and I am not sure what is going wrong. I don't have the AtMega32u4 listed, but I believe I used the Leonardo last time and it worked. However, now I can't get it to take new code. I tried just commenting out a few lines, compile, upload, and then press the reset button on the board. At this point the board sits flashing a green LED and the serial port has disappeared from the IDE.

Do I need to pick a different board or somehow install the AtMega32u4 (but like I said I was able to get code to it before and it still runs the initial pattern), or I am doing someting else wrong?

I can downlad code to my Arduino Uno just fine (by selecting it from the board menu).
OS: Ubuntu 12.10

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

Re: Programming LedBlinky Belt

Post by adafruit_support_mike »

The ATmega32u4 is the same chip used in the Leonardo, and it handles its own USB. The Uno uses a separate chip as a USB interface between the micrcocontroller and the computer.

That means the 32u4 only appears as a COM port while the bootloader is active. You'll need to press the reset button to run the bootloader, then upload the code.

User avatar
cytochromec
 
Posts: 7
Joined: Tue Apr 01, 2014 2:08 pm

Re: Programming LedBlinky Belt

Post by cytochromec »

I tried several combos of timing and finally got the code to get on the board. Most of the time when I hit reset and then upload or upload and then reset the green LED just "breathes" instead of quick pulses. I have only gotten the code to load twice. Here is the error report:


This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.5 (Linux), Board: "Arduino Leonardo"
Binary sketch size: 9,808 bytes (of a 28,672 byte maximum)
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
processing.app.debug.RunnerException: Couldn’t find a Leonardo on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:153)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1682)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2494)
at java.lang.Thread.run(Thread.java:744)

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

Re: Programming LedBlinky Belt

Post by adafruit_support_mike »

The 'breathing' pattern is what the bootloader does while it waits to receive input. It should last for about 10 seconds.

Windows can make it a bit challenging to get the timing right, because it takes a few seconds to identify the bootloader and create a COM port.

Press the reset button first so Windows can get a head start on creating the COM port, then click the Upload button in the Arduino IDE. That will compile the code, and hopefully will be ready to talk to the chip when Windows allows the connection.

User avatar
cytochromec
 
Posts: 7
Joined: Tue Apr 01, 2014 2:08 pm

Re: Programming LedBlinky Belt

Post by cytochromec »

I am actually on Linux (Ubuntu 12.10). I did some searching and found that Ubuntu has a program called modemmanager which grabs the serial port and tries to "manage" it.
I removed that package, restarted, then held down reset, uploaded the code and released reset when the IDE was finished compiling and the code loads everytime!

Removing the package doesn't interfere with my ability to program my Uno so all is well.

We will be using these Blinky Belts with middle school students to teach them electronics and programming. Thanks for making tech cool.

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

Re: Programming LedBlinky Belt

Post by adafruit_support_mike »

Glad to hear you found a solution that works for you.

My personal credo:

- People should be helpful
- Machines should be obedient
- Swapping those around is just begging for trouble

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

Return to “Other Arduino products from Adafruit”