šŸ”®Adafruit sale all weekend long ā€“ use the code ADATHX for 15% off! šŸ”®
0

Unable to program a new Gemma v2 - dim red light
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Unable to program a new Gemma v2 - dim red light

by ronp001 on Tue Jun 07, 2016 11:39 pm

I received my order of a Gemma v2 (order #1122779-3556639782, purchased June 3, 2016) and followed the instructions to connect it to my Mac using Arduino IDE 1.6.9, but:

1. When pressing the reset button on the Gemma, the red LED does not flash, but instead lights up dimly. Sometimes it turns off after a few seconds, other times it simply stays on until I power off the Gemma board. Here is a short video: https://drive.google.com/open?id=0B0cac ... HpJVWlTT0E

2. When trying to upload a sketch to the device using the USBtinyISP programmer, I get the error
Code: Select all | TOGGLE FULL SIZE
"avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)"
. If I change the Programmer to "Arduino Gemma" I get the error
Code: Select all | TOGGLE FULL SIZE
"avrdude: can't open config file "/Users/.../Library/Arduino15/packages/adafruit/hardware/avr/1.4.7/bootloaders/gemma/avrdude.conf": No such file or directory"


Searching the support forums, I found a thread (viewtopic.php?f=20&t=44721) which suggests that the Gemma board might be defective.

Is there anything that can be done, or do I need a new board?

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by adafruit_support_bill on Wed Jun 08, 2016 5:59 am

Looks like the bootloader on the board is not running. Please contact support@adafruit.com with a link to this thread and we can send a replacement.

adafruit_support_bill
 
Posts: 79404
Joined: Sat Feb 07, 2009 10:11 am

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Thu Jun 09, 2016 2:20 pm

Thanks - Adafruit service was very prompt and I got a replacement Gemma today.

Unfortunately, the new board is exhibiting the exact same behavior as the previous one: pushing the reset button results in the red LED light staying on dimly for a while (but sometimes staying on indefinitely), and the device is not recognized by the Arduino IDE.

Is this a bad batch, or am I doing something wrong?

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by adafruit_support_bill on Thu Jun 09, 2016 2:35 pm

Two bad ones is highly unlikely. There must be something wrong in your setup. Maybe try a different USB cable?

adafruit_support_bill
 
Posts: 79404
Joined: Sat Feb 07, 2009 10:11 am

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Thu Jun 09, 2016 5:03 pm

Tried with 3 different cables, and two different power sources (Mac USB and phone charger). Same behavior.

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Thu Jun 09, 2016 6:06 pm

Interestingly, the "on" duration of the red LED is identical in both boards (about 3s).

Here's a video that shows the buttons being pressed on both Gemma boards simultaneously: https://drive.google.com/file/d/0B0cac17LKy_GSzAxRGhnTGs0Smc/view?usp=sharing

Is there something else I can try?

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by adafruit_support_bill on Fri Jun 10, 2016 6:08 am

Interesting. Let me check with the rest of the team.

adafruit_support_bill
 
Posts: 79404
Joined: Sat Feb 07, 2009 10:11 am

Re: Unable to program a new Gemma v2 - dim red light

by adafruit_support_rick on Fri Jun 10, 2016 11:23 am

The red LED will respond differently when there is a bad USB connection.

I see that you've tried some different cables. Can you try a different USB port on the Mac? Do you have a USB2.0 hub you can try connecting through?

Does either Gemma show up in the Mac System Report? It should appear in USB devices.

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

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Fri Jun 10, 2016 11:55 am

I see that you've tried some different cables.


Yes - I tried 3 different cables. I verified the cables work well by connecting my Mac to a Kindle with each cable and viewing the Kindle's files.

Can you try a different USB port on the Mac?


Tried two USB ports on the Mac. Also tried with a different Mac, and by connecting directly to a USB wall charger. Same behavior in all instances.


Do you have a USB2.0 hub you can try connecting through?


Did that now. No difference.

Does either Gemma show up in the Mac System Report? It should appear in USB devices.


No, they do not, regardless of which cable, port, Gemma or hub I'm using, or how many times I refresh the Mac System Report - and even when I refresh the system report while the red LED is on. Also tried connecting both Gemmas simultaneously to the same Mac (using different ports and cables, of course) - and neither of them show up. Just to make sure that I'm doing this correctly I verified that the Kindle and the USB hub show up in the report (they do).

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Fri Jun 10, 2016 12:38 pm

I ran an additional test now: kept both Gemmas plugged into the USB hub, and plugged/unplugged the hub from the Mac. In about half the tries, the behavior was like before. But on some tries, one of the Gemmas came to life (flashed the red LED and showed up in the System Report as "Trinket") - this was very surprising, as it was the first time I saw the LED turn on fully and flash.

The behavior was very inconsistent: sometimes it worked when I plugged the hub into the Mac, and sometimes it didn't.

I verified that this is Gemma-dependent and not cable-dependent by swapping the Gemma/cable attachment (it's definitely a particular Gemma that sometimes responds - happens with both cables, the other Gemma remains non-flashing no matter which cable it is connected to).

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by adafruit_support_rick on Fri Jun 10, 2016 1:39 pm

That's really weird. We can try replacing the Gemma again. But if the problem persists, I'll have to conclude that it's some problem with your setup, most likely cables (in spite of the fact that they work with your Kindle).

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

Re: Unable to program a new Gemma v2 - dim red light

by adafruit2 on Fri Jun 10, 2016 2:46 pm

its defienitely your setup - replacing the gemmas will not help!
use a USB hub if you can, your USB ports are not letting the Gemma enumerate for some reason.

adafruit2
Site Admin
 
Posts: 19493
Joined: Fri Mar 11, 2005 7:36 pm

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Fri Jun 10, 2016 2:53 pm

your USB ports are not letting the Gemma enumerate for some reason.


I don't understand the conclusion. When plugging a Gemma into an iPhone wall charger, should the red LED blink? Could having previously connected it to a Mac influence its behavior when connected to a wall charger?

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Re: Unable to program a new Gemma v2 - dim red light

by adafruit_support_rick on Fri Jun 10, 2016 6:19 pm

The red led may or may not *blink*, depending on whether or not a blink program is loaded. However, it should 'pulse' for about ten seconds after you press the reset button.

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

Re: Unable to program a new Gemma v2 - dim red light

by ronp001 on Fri Jun 10, 2016 6:52 pm

The red led may or may not *blink*, depending on whether or not a blink program is loaded. However, it should 'pulse' for about ten seconds after you press the reset button.


Sorry - meant to say 'pulse', not 'blink'.

So to clarify my current understanding from your response and from the docs I've seen up to now (please correct me if I'm mistaken): if I plug a Gemma into a USB wall charger (in which the USB serial data wires aren't connected to anything), and press the reset button on the Gemma, then the red LED should pulse.

This isn't what is happening with the two Gemma boards I have right now: if I plug them into a USB wall charger and press the reset button, the red LED does not pulse.

In your previous posts, you concluded that the Gemma boards are fine and that there is a problem with my setup. I'm not necessarily claiming otherwise, but I'm trying to understand how such a conclusion aligns with the behavior I'm witnessing. My own analysis at this point is that there are 3 possible options:

Option 1: contrary to the above description, pressing the reset button on a Gemma board that is plugged to a USB wall charger (that doesn't have any serial data connection) should NOT cause the LED to pulse (in which case, perhaps you would consider mentioning this explicitly in the tutorial?)
Option 2: the 3 different USB wall chargers I used for testing are all communicating with the Gemma over a serial USB connection (which doesn't appear very likely)
Option 3: the conclusion that the Gemma boards are fully functional is wrong.

I'd really love to know which of the above options is the right one.


BTW - For my current purposes, the one Gemma which my Mac sometimes recognizes through a USB hub is good enough, as I don't expect to have to upload sketches to it a significant number of times. Nevertheless, I'd still like to understand whether its behavior when plugged into a wall charger indicates that it's malfunctioning or if it's working as designed.

ronp001
 
Posts: 8
Joined: Sat Apr 02, 2016 2:56 pm

Please be positive and constructive with your questions and comments.