Go Down

Topic: read sd (Read 857 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
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy