system
May 20, 2014, 10:22pm
#1
Hi,
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”, SD.open(“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)
system
May 20, 2014, 10:34pm
#2
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.
system
May 20, 2014, 10:49pm
#3
Thank you for your help.
Do you have any suggestions as to how I approach this problem? I am eager to learn and improve.
system
May 20, 2014, 10:52pm
#4
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.