Post a new topicPost a reply Page 1 of 2   [ 15 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: Problems with SD Card
PostPosted: Mon Jan 23, 2012 2:34 pm 

Joined: Fri Nov 25, 2011 1:45 pm
Posts: 10
Hi:

I have a problem with the SD card, I do not get anything on the card, i cant create files, or listing them. Even i cant get the size or memory free.
For example:
Code:
  SD.begin();   
  SD.ON();
  RTC.ON();
  USB.begin();
  USB.println("Begining...\n");
  USB.print("Size: ");
  USB.println(SD.getDiskSize());
  USB.print("Free Size: "); 
  USB.println(SD.getDiskFree());


It shows me 0 on both.
The card works fine because I've been trying and not give problems.

Thanks


Top
 Profile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Mon Jan 23, 2012 2:40 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7812
Dear libil,

There are some SD card examples included with Waspmote IDE. Did you tested them?

Are you able to see created files on SD card?

On the other hand, Which SD card are you using?

Please try this before going further.

Regards


Top
 OnlineProfile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Mon Jan 23, 2012 7:33 pm 

Joined: Fri Nov 25, 2011 1:45 pm
Posts: 10
i tested them a few week ago and worked fine.
But now i've used same examples and dont work.
Its extrange because i have test with the same 2 SD cards that i used before.
I dont know where can be the problem.


Top
 Profile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Mon Jan 23, 2012 7:34 pm 

Joined: Fri Nov 25, 2011 1:45 pm
Posts: 10
I know that the SD works fine because i used them before with the examples and worked fine.


Top
 Profile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Mon Jan 23, 2012 7:36 pm 

Joined: Fri Nov 25, 2011 1:45 pm
Posts: 10
Ahm, another thing, now i cant see the created files or anything, is like i had no SD in the waspmote.
I cant create or read or see files inside the SD


Top
 Profile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Mon Jan 23, 2012 8:18 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7812
libil,

Can you post your code?

On the other hand, use SD.isSD() function and see what happens. Maybe your wasp is not recognising SD card...

Regards!


Top
 OnlineProfile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Wed Jan 25, 2012 5:51 pm 

Joined: Fri Nov 25, 2011 1:45 pm
Posts: 10
I've been testing lots of programs.
But its very extrange, with same program Sometimes it detects the card and sometimes not.
Its working fine but suddenly stops detecting the card.


Top
 Profile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Wed Jan 25, 2012 7:29 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7812
libil,

Glad to see it working.

Sometimes Sd card can be inserted wrong, because very sensitive.

If you see some trouble, unplug and plug again Sd card

Regards.


Top
 OnlineProfile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Sat Apr 28, 2012 11:36 am 

Joined: Wed Apr 25, 2012 4:19 pm
Posts: 31
Hello,
Anybody can help me? I have the same problem list as above, my waspmote SD card can not save data and create files. It's so weird. Also, I am eager to know how to use the SD card correctly, maybe some useful codes are beneficial for me, just a beginner, hope anyone to have me, thanks.

wangzy1026


Top
 Profile  
 
 Post subject: Re: Problems with SD Card
PostPosted: Sat Apr 28, 2012 12:46 pm 

Joined: Wed Apr 25, 2012 4:19 pm
Posts: 31
Now, I tested my SD card using the following codes with the working results. Plz help me check it why the SD card can not create any files, thanks very much.

Quote:

float SDTest = 9.0000;

void setup() {
USB.begin();

//Code for checking that the SD card is installed and functional
SD.ON();
SDTest = SD.isSD();
if (SDTest == 9.0000)
USB.println("Check function failed");
else if (SDTest == 0.0000)
USB.println("SD card is not inserted");
else if (SDTest == 1.86)
USB.println("SD card successfully inserted");
else
{
USB.println("SD card reading problem - unspecified error");
}

USB.println(SDTest);
USB.println("Disk Info: ");
USB.println(SD.print_disk_info());

// Creating the new file on the SD card to be written to
SD.create("Test_File_Ag.txt");

}[/code]

The test results are:
Quote:
SD card reading problem - unspecified error
1.0000000000
Disk Info:



Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 15 posts ]
Go to page 1, 2  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use