Adafruit CC3000 WiFi Shield problem with sd

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
toegap
 
Posts: 14
Joined: Sun Aug 18, 2013 3:23 am

Adafruit CC3000 WiFi Shield problem with sd

Post by toegap »

Hello,

Trying to work with Adafruit CC3000 WiFi Shield with Onboard Ceramic Antenna with a Mega 1280. I soldered the pins and icsp header. The MOSI, SCK and MISO pads have been solder on the bottom. Tried to run a simple SD sketch(sdfat library) to test its functionality, chipSelect set for pin 4. No dice, I get an error. If I run this same sketch with the "Ethernet shield with SD" and the Mega 1280 it works fine. Do you know what I could be doing wrong? Is there another step that I should take? Do you have a schematic for the wifi shield?

Here is the sketch.

Code: Select all

// Ported to SdFat from the native Arduino SD library example by Bill Greiman
// On the Ethernet Shield, CS is pin 4. SdFat handles setting SS
const int chipSelect = 4;


/*
 SD card read/write
  
 This example shows how to read and write data to and from an SD card file 	
 The circuit:
 * SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 4
 
 created   Nov 2010
 by David A. Mellis
 updated 2 Dec 2010
 by Tom Igoep
 modified by Bill Greiman 11 Apr 2011
 This example code is in the public domain.
 	 
 */
#include <SdFat.h>
SdFat sd;
SdFile myFile;

void setup() {
  //digitalWrite(53,HIGH);
  Serial.begin(9600);
  while (!Serial) {}  // wait for Leonardo
  Serial.println("Type any character to start");
  while (Serial.read() <= 0) {}
  delay(400);  // catch Due reset problem
  
  // Initialize SdFat or print a detailed error message and halt
  // Use half speed like the native library.
  // change to SPI_FULL_SPEED for more performance.
  if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt();

  // open the file for write at end like the Native SD library
  if (!myFile.open("test.txt", O_RDWR | O_CREAT | O_AT_END)) {
    sd.errorHalt("opening test.txt for write failed");
  }
  // if the file opened okay, write to it:
  Serial.print("Writing to test.txt...");
  myFile.println("testing 1, 2, 3.");

  // close the file:
  myFile.close();
  Serial.println("done.");

  // re-open the file for reading:
  if (!myFile.open("test.txt", O_READ)) {
    sd.errorHalt("opening test.txt for read failed");
  }
  Serial.println("test.txt:");

  // read from the file until there's nothing else in it:
  int data;
  while ((data = myFile.read()) >= 0) Serial.write(data);
  // close the file:
  myFile.close();
}

void loop() {
  // nothing happens after setup
}
----

Here is the error.

Can't access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X1,0X0
Last edited by adafruit_support_bill on Fri Sep 06, 2013 6:42 am, edited 1 time in total.
Reason: Please use the 'code' button when submitting code

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by adafruit_support_bill »

Post photos of the front and back of the shield so we can check the assembly. Schematics are not up on github yet. I'll see if I can track them down.

toegap
 
Posts: 14
Joined: Sun Aug 18, 2013 3:23 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by toegap »

Here you go.
Attachments
pics3.zip
(216.48 KiB) Downloaded 57 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by adafruit_support_bill »

Do you have any higher-resolution photos? I can't see much detail in the solder joints. About 800x600 pixels is usually good.

toegap
 
Posts: 14
Joined: Sun Aug 18, 2013 3:23 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by toegap »

Here you go.
Attachments
IMG_0016.zip
(472.55 KiB) Downloaded 44 times

toegap
 
Posts: 14
Joined: Sun Aug 18, 2013 3:23 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by toegap »

Another one.

I have to separate them because I keep hitting your upload limit of 1 mb for files, you really should think about increasing that, it is not that much these days.
Attachments
IMG_0015.zip
(595.11 KiB) Downloaded 33 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by adafruit_support_bill »

Still can't see much detail because they are not in focus. The 1M limit is generally not a problem since you can upload up to 3 images directly via the "Upload attachment" tab. There is no need to zip them. You can get plenty of detail in a sub-100 Kb jpeg.

Have you tried the CardInfo sketch? That sometimes give better diagnostics.
Attachments
2013_09_02_IMG_2112-1024.jpg
2013_09_02_IMG_2112-1024.jpg (68.6 KiB) Viewed 1485 times
2013_09_02_IMG_2124-1024.jpg
2013_09_02_IMG_2124-1024.jpg (60.1 KiB) Viewed 1485 times
2013_09_02_IMG_2126-1024.jpg
2013_09_02_IMG_2126-1024.jpg (52.04 KiB) Viewed 1485 times

toegap
 
Posts: 14
Joined: Sun Aug 18, 2013 3:23 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by toegap »

Give these a try. If they don't work, I will have to send them later.

Are you putting that icsp header in right?
Attachments
IMG_0017.jpg
IMG_0017.jpg (498.82 KiB) Viewed 1481 times
IMG_0016.jpg
IMG_0016.jpg (473.18 KiB) Viewed 1481 times
IMG_0015.jpg
IMG_0015.jpg (595.7 KiB) Viewed 1481 times

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

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by adafruit_support_rick »

toegap wrote:Are you putting that icsp header in right?
Oops - no, he's not. Should look like this:
Image

toegap
 
Posts: 14
Joined: Sun Aug 18, 2013 3:23 am

Re: Adafruit CC3000 WiFi Shield problem with sd

Post by toegap »

Rick,

I re-inspected the 3 solder jumpers on the bottom labeled MISO/MOSI/SCLK. It looks as though the solder didn't make it across at least one of the joints. I ran the solder over them again. Re-ran the sketch and it works. Thanks for the help!

-toegap

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

Return to “Other Arduino products from Adafruit”