read sd

someone can say me why this code do not works

  String cadena[1]={"key.txt"};
  if (SD.exists(cadena[0])) digitalWrite(led,HIGH);

try this

 char cadena[1][8]={"key.txt"};
  if (SD.exists(cadena[0])) digitalWrite(led,HIGH);

or

  String cadena[1]={String("key.txt")};
  char buf[8];
  cadena[0].toCharArray(buf,8);
  if (SD.exists(buf)) digitalWrite(led,HIGH);

amz

Do not cross post!

Potential helpers read what this member has been doing:

http://forum.arduino.cc/index.php?action=profile;u=170985;sa=showPosts;start=0