SD Card Error on second pass of loop


hi all,

i using section of code sd examples when testing in loop on first pass output "card initialised as  expected , on subsequent loops presents card failed, or not present error message.

i don't understand why happen.

code: [select]

void cardstart()
{
  serial.print("initializing sd card...");
  digitalwrite(chipselect, high);
  delay(50);
  // see if card present , can initialized:
  if (!sd.begin(chipselect)) {
    serial.println("card failed, or not present");
    // don't more:
    while (1) ;
  }
  serial.println("card initialized.");

}


any or explanations appreciated always

i made simple code mail me: thomas.van_aken@hotmail.com


Arduino Forum > Using Arduino > Programming Questions > SD Card Error on second pass of loop


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code