Cannot upload any code to my Gemma

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
User avatar
evan.paster
 
Posts: 15
Joined: Sun Aug 04, 2013 3:41 pm

Cannot upload any code to my Gemma

Post by evan.paster »

I've tried uploading code on two different Gemmas. I followed on the instructions on updating my arduino for GEMMA (the avrdude file, MAC ID, and hardware library).

I've got a mac and have successfully programmed a flora board before. I cannot even upload the TEST blinking red code. I get the following error code (obviously in red)

avrdude: error: usbtiny_receive: usb_control_msg(DeviceRequestTO): no connection to an IOService (expected 4, got -6)

avrdude: error: usbtiny_receive: usb_control_msg(DeviceRequestTO): no connection to an IOService (expected 4, got -6)
avrdude: verification error, first mismatch at byte 0x0000
0x20 != 0x00
avrdude: verification error; content mismatch

avrdude: error: usbtiny_transmit: usb_control_msg(DeviceRequestTO): no connection to an IOService
Last edited by evan.paster on Mon Jun 30, 2014 11:16 pm, edited 1 time in total.

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: Cannot upload any code to my Gemma

Post by Franklin97355 »

Have you selected the gemma in the boards menu and pushed the reset button just before the code starts downloading?

User avatar
evan.paster
 
Posts: 15
Joined: Sun Aug 04, 2013 3:41 pm

Re: Cannot upload any code to my Gemma

Post by evan.paster »

Yes, I've tried that. the really strange thing is that now both of my gemmas (after I've tried to upload the programs) stay in boot mode forever. They never time out.

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: Cannot upload any code to my Gemma

Post by Franklin97355 »

What was the code you tried to upload? Could you post it here?

User avatar
evan.paster
 
Posts: 15
Joined: Sun Aug 04, 2013 3:41 pm

Re: Cannot upload any code to my Gemma

Post by evan.paster »

I've tried two different codes:

1. Standard red light blink
https://learn.adafruit.com/introducing- ... rduino-ide


/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain.

To upload to your Gemma or Trinket:
1) Select the proper board from the Tools->Board Menu
2) Select USBtinyISP from the Tools->Programmer
3) Plug in the Gemma/Trinket, make sure you see the green LED lit
4) For windows, install the USBtiny drivers
5) Press the button on the Gemma/Trinket - verify you see
the red LED pulse. This means it is ready to receive data
6) Click the upload button above within 10 seconds
*/

int led = 1; // blink 'digital' pin 1 - AKA the built in red LED

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);

}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

2. Earrings
https://learn.adafruit.com/gemma-hoop-e ... m-over-usb

// Low power NeoPixel earrings example. Makes a nice blinky display
// with just a few LEDs on at any time...uses MUCH less juice than
// rainbow display!

#include <Adafruit_NeoPixel.h>

#define PIN 0

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(32, PIN);

uint8_t mode = 0, // Current animation effect
offset = 0; // Position of spinny eyes
uint32_t color = 0xffae00; // Start red
uint32_t prevTime;

void setup() {
pixels.begin();
pixels.setBrightness(60); // 1/3 brightness
prevTime = millis();
}

void loop() {
uint8_t i;
uint32_t t;

switch(mode) {

case 0: // Random sparks - just one LED on at a time!
i = random(32);
pixels.setPixelColor(i, color);
pixels.show();
delay(10);
pixels.setPixelColor(i, 0);
break;

case 1: // Spinny wheels (8 LEDs on at a time)
for(i=0; i<16; i++) {
uint32_t c = 0;
if(((offset + i) & 7) < 2) c = color; // 4 pixels on...
pixels.setPixelColor( i, c); // First eye
pixels.setPixelColor(31-i, c); // Second eye (flipped)
}
pixels.show();
offset++;
delay(50);
break;
}

t = millis();
if((t - prevTime) > 8000) { // Every 8 seconds...
mode++; // Next mode
if(mode > 1) { // End of modes?
mode = 0; // Start modes over
color >>= 8; // Next color R->G->B
if(!color) color = 0xffae00; // Reset to red
}
for(i=0; i<32; i++) pixels.setPixelColor(i, 0);
prevTime = t;
}
}

User avatar
evan.paster
 
Posts: 15
Joined: Sun Aug 04, 2013 3:41 pm

Re: Cannot upload any code to my Gemma

Post by evan.paster »

I got the Gemma to receive an upload of the blink code on the Windows computer. All I had to do on Windows was download the Gemma Arduino IDE and install the drivers. So i know the usb cord and gemma work.

ON A MAC. I get all kinds of errors. I've tried using a second mac laptop. I'm using the standard blink code with Arduino 1.0.2 with all of the updates. I cannot install the 1.0.5 as this mac keeps saying the install file is trash and must be deleted. . Here is the newest error using 1.0.5.

In file included from /Applications/Adafruit-Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:193,
from blink.ino:17:
/Applications/Adafruit-Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h:125:2: error: #error TXC0 not definable in HardwareSerial.h

What the hell is going on???? I'm about to return all of my gemmas to Adafruit, as they seem to just be non-functional on a mac.

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

Re: Cannot upload any code to my Gemma

Post by adafruit_support_rick »

evan.paster wrote:ON A MAC. I get all kinds of errors. I've tried using a second mac laptop. I'm using the standard blink code with Arduino 1.0.2 with all of the updates. I cannot install the 1.0.5 as this mac keeps saying the install file is trash and must be deleted. . Here is the newest error using 1.0.5.
The file is not trash. If you're using Mac OS BANNED you will need to update the setting to permit running Arduino IDE
Go to your Security and Privacy Settings
1) Click the Lock Icon and Login
2) Change "Allow Apps Downloaded From": to "Anywhere"
3) Open the downloaded IDE.
4) Go back to the Security preferences and change the selection back to "Mac App Store and identified developers"
5) You only need to go through this procedure once. BANNED will remember that it's OK to run the app.

Try this and see if it works for you

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

Return to “Arduino”