WiFly Shield + Arduino UNO = Reset button before sketch runs

I have a weird bug going on… If I plug in the usb cable to my Arduino UNO with the Wifly Shield attached, my code gets stuck at SpiSerial.begin(). Once I press the reset button on the WiFly shield board, everything works fine. Anyone know what’s going on?

Here’s a code snippet of what I mean…

void setup()   { 
  pinMode(3, OUTPUT);

  delay(500); //Put this here thinking it could be a delay problem
  SpiSerial.begin();  //Code gets stuck here until I reset the Arduino
  delay(100); 

  //Blink Sequence to test if it got past SpiSerial.begin()
  for(int ii = 1; ii < 5; ii++){
    digitalWrite(3, HIGH);
    delay(100);
    digitalWrite(3, LOW);
    delay(100);
  }
   Serial.begin(9600);
}

void loop {
\\Do Something
}

Just noticed that with the WiFly Shield attached, no sketch will run until the Board is reset.

–Ryan

Another update…

This doesn’t appear to be happening with the Arduino Duemilanove. It only happens with the Arduino UNO.

–Ryan

Hi Ryan - did you get to the bottom of this?

I have exactly the same problem and it means I can’t roll out my board into production because it’s in a location where the power keeps cutting out.

A workaround would be an external watchdog circuit which resets the Arduino if a certain pin isn’t high, but that’s really crazy.

Please let me know if you cracked it!

Pete

Hi to All!

I am having exactly the same issue. I am using the latest wifly with an Arduino Uno R2. I need always to press the reset button at the top of the wifly in order to get the Arduino running the program. I have tried many software tricks and try to power using different power sources but none worked.

Is there anyone with the same hardware NOT having this issue? Is it strange that there aren’t many discussion on this so far…

I’m using the Uno R3, I had a similar issue when I was trying to use a select pin other than 10. I swapped the shields and allowed the Wifly rn-131C to use pin 10 and the other shield to use pin 3. Solved my issue. I never followed up after the simple solution started to work. Hope this points you in a direction:)

Thanks pnewmancalgary. I have found this discussion that talks about a similar problem happening on a custom shield: http://arduino.cc/forum/index.php?topic=86389.0

It seems that the problem is only happening on Arduino R2. I am going to buy an Arduino R3 and try.