file -> char?


I am new to C++ and Arduino. Is there any way to go from File → char? I am trying to read an SD card and send a file as an SMS.

(sms.SendSMS(“123456”,“LOGGER01.CSV”))); Returns the error "no matching function call to "SMSGSM::SendSMS(const char [11], File)’

I appreciate any help.

Very_close_and_cleaner.ino (2.97 KB)

You treat files like any other stream (such as Serial). You open the file, then you read from it into a string (usually a character at a time) parsing it as you go. Then you can send that string elsewhere, such as to your GSM module.

Thank you for your help.

Do you have any suggestions as to how I approach this problem? I am eager to learn and improve.

Take a look at the "DumpFile" example in the SD library examples menu. That will show you that it's exactly the same as working with Serial.