Go Down

Topic: read sd (Read 609 times) previous topic - next topic

EJTR


someone can say me why this code do not works

Code: [Select]


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


amz_

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


or
Code: [Select]


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


amz
AMZ

liudr

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

Go Up