Wave Shield only works when reset

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bratan
 
Posts: 49
Joined: Sun Mar 25, 2012 2:08 pm

Wave Shield only works when reset

Post by bratan »

I'm having real bizarre issue with Wave Sheild connected to Mega 2560 R3. After I upload sketch, everything is frozen until I either hit reset or initiate Serial Communication (which I guess resets the board). Also if it's powered on/off same thing, I always have to reset before it starts working. From that point everything works great.
I suspect issue might be with connections to the Arduino board. I don't have it "plugged in" instead I just ran jumper wires, so it's possible I missed one?
I have all 8 data pins (DAC and SD) connected (correctly), 1 ground wire, 5V and 1 Reset wire on the opposite side.
It's hard to diagnose problem due to Serial Monitor not running when Arduino powered on. As soon as I start Serial Monitor it starts resets and starts working. I've reformatted SD card with SDFormatter...
I've tried uncommenting while(1); in the Setup but it still freezes.
Any suggestions?
Here's my Setup just in case.

Code: Select all

void setup ()  
{
  ht1632_setup();  // Setup LED Deisplay
  setBrightness(1); // Set Brightness 
  //randomSeed(analogRead(1));
  Serial.begin(9600);
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if(timeStatus()!= BANNED) 
     Serial.println("Unable to sync with the RTC");
  else
     Serial.println("RTC has set the system time");    
  // Uncomment following two lines and modify to set time. After setting time, commend them and re-upload sketch
  //setTime(13,04,0,9,11,12); // Set time on Arduino (hr,min,sec,day,month,yr). Use with RTC.set(now());
  //RTC.set(now()); // Write Time data to RTC Chip. Use with previous command
  analogReference(EXTERNAL); // Set reference voltage check to 3.3 V for Temperature measuring
   
  // Wave Shield init
 // if (!card.init(true)) { //play with 4 MHz spi if 8MHz isn't working for you
  if (!card.init()) {         //play with 8 MHz spi (default faster!)  
    putstring_nl("Card init. failed!");  // Something went wrong, lets print out why
    sdErrorCheck();
    while(1);                            // then 'halt' - do nothing!
  }
  // enable optimize read - some cards may timeout. Disable if you're having problems
  card.partialBlockRead(true);
 
 
// Now we will look for a FAT partition!
  uint8_t part;
  for (part = 0; part < 5; part++) {     // we have up to 5 slots to look in
    if (vol.init(card, part)) 
      break;                             // we found one, lets bail
  }
  if (part == 5) {                       // if we ended up not finding one  :(
    putstring_nl("No valid FAT partition!");
    sdErrorCheck();      // Something went wrong, lets print out why
    while(1);                            // then 'halt' - do nothing!
  }
  
  // Lets tell the user about what we found
  putstring("Using partition ");
  Serial.print(part, DEC);
  putstring(", type is FAT");
  Serial.println(vol.fatType(),DEC);     // FAT16 or FAT32?
  
  
  // Try to open the root directory
  if (!root.openRoot(vol)) {
    putstring_nl("Can't open root dir!"); // Something went wrong,
    while(1);                             // then 'halt' - do nothing!
  }
  
  // Whew! We got past the tough parts.
  putstring_nl("Ready!");
}

User avatar
bratan
 
Posts: 49
Joined: Sun Mar 25, 2012 2:08 pm

Re: Wave Shield only works when reset

Post by bratan »

I can't Edit my post?
Anyway I wanted to add issue happens even with default "daphc" sketch in the Examples of the library.

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

Re: Wave Shield only works when reset

Post by adafruit_support_rick »

Sounds like a timing issue on startup. A simple thing to try would be to move the display initialization to after the serial and rtc setup. You could also add a delay() to give you a chance to open the serial monitor.

Code: Select all

void setup ()  
{
  //randomSeed(analogRead(1));
  Serial.begin(9600);
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if(timeStatus()!= BANNED) 
     Serial.println("Unable to sync with the RTC");
  else
     Serial.println("RTC has set the system time");    
  ht1632_setup();  // Setup LED Deisplay
  setBrightness(1); // Set Brightness 
 

User avatar
bratan
 
Posts: 49
Joined: Sun Mar 25, 2012 2:08 pm

Re: Wave Shield only works when reset

Post by bratan »

Thanks, but it didn't help. Issue happens even with example sketch :(

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

Re: Wave Shield only works when reset

Post by adafruit_support_rick »

Bratan wrote:Thanks, but it didn't help. Issue happens even with example sketch
Post detailed pictures of both sides of the shield.

User avatar
bratan
 
Posts: 49
Joined: Sun Mar 25, 2012 2:08 pm

Re: Wave Shield only works when reset

Post by bratan »

Post detailed pictures of both sides of the shield.
Connected to Arduino or disconnected?

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

Re: Wave Shield only works when reset

Post by adafruit_support_rick »

Disconnected. Make sure the pictures are clear and focused, sop we can check the assembly and soldering.

User avatar
bratan
 
Posts: 49
Joined: Sun Mar 25, 2012 2:08 pm

Re: Wave Shield only works when reset

Post by bratan »

Sorry for late reply. By the time I had chance to took detailed pictures, I got problem resolved :) I soldered all connections with wires instead of using breadboard, and now I'm not hanging. It was hanging while trying to read the card, and wires were either too long or had bad contact.

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

Re: Wave Shield only works when reset

Post by adafruit_support_rick »

Bratan wrote:I soldered all connections with wires instead of using breadboard, and now I'm not hanging. It was hanging while trying to read the card, and wires were either too long or had bad contact.
That's a real common problem. Glad you figured it out :D

For anyone else who finds this thread and has the same problem: Try different wires, try different breadboard positions, or just solder it !

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

Return to “Arduino Shields from Adafruit”