deprecated conversion from string constant to 'char*'

#include "SIM900.h"
#include <SoftwareSerial.h>
//If not used, is better to exclude the HTTP library,
//for RAM saving.
//If your sketch reboots itself proprably you have finished,
//your memory available.
//#include "inetGSM.h"

//If you want to use the Arduino functions to manage SMS, uncomment the lines below.
#include "sms.h"
SMSGSM sms;

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.open-electronics.org
//this code is based on the example of Arduino Labs.

//Simple sketch to send and receive SMS.

int numdata;
boolean started = false;
char smsbuffer[160];
char n[20];

void setup()
{
  //Serial connection.
  Serial.begin(9600);
  Serial.println("GSM Shield testing.");
  //Start configuration of shield with baudrate.
  //For http uses is raccomanded to use 4800 or slower.
  if (gsm.begin(2400)) {
    Serial.println("\nstatus=READY");
    started = true;
  } else Serial.println("\nstatus=IDLE");

  if (started) {
    //Enable this two lines if you want to send an SMS.
    //if (sms.SendSMS("3471234567", "Arduino SMS"))
    //Serial.println("\nSMS sent OK");
  }

};

void loop()
{
  if (started) {
    sms.GetSMS(1, n, 20, smsbuffer, 160);
    Serial.println(n);
    Serial.println(smsbuffer);
    if (sms.SendSMS("3471234567", "Arduino SMS"))
      Serial.println("\nSMS sent OK");
    delay(1000);
  }
};

always make error deprecated conversion.

Can you please post the entire error message

C:\Users\WINSDO~1\AppData\Local\Temp\arduino_8cb4b72e0bb726dc8b78e8327f92aca4\GSM_GPRSLibrary_SMS.ino: In function 'void loop()':

C:\Users\WINSDO~1\AppData\Local\Temp\arduino_8cb4b72e0bb726dc8b78e8327f92aca4\GSM_GPRSLibrary_SMS.ino:52:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if (sms.SendSMS("3471234567", "Arduino SMS"))

^

C:\Users\WINSDO~1\AppData\Local\Temp\arduino_8cb4b72e0bb726dc8b78e8327f92aca4\GSM_GPRSLibrary_SMS.ino:52:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

Compilers are getting snippy these days about passing string constants (like "foo") to a function that does not declare the argument as const.

For example:

void foo (char * bar)
  {
  }
...
foo ("hovercraft");

The fix is to either make the function take a constant, like this:

void foo (const char * bar)
  {
  }
...
foo ("hovercraft");

Or, to supply a non-const argument, like this:

void foo (char * bar)
  {
  }
...
char whatever [] = "hovercraft";
...
foo (whatever);

inside code of #include "sms.h"

ifndef SMS_H

define SMS_H

include "SIM900.h"

class SMSGSM { public: // SMS's methods char SendSMS(char *number_str, char *message_str); char SendSMS(byte sim_phonebook_position, char *message_str); char IsSMSPresent(byte required_status); char GetSMS(byte position, char *phone_number,byte max_phone_len, char *SMS_text, byte max_SMS_len);

char GetAuthorizedSMS(byte position, char *phone_number, byte max_phone_len, char *SMS_text, byte max_SMS_len, byte first_authorized_pos, byte last_authorized_pos); char DeleteSMS(byte position);

};

endif

if (sms.SendSMS("3471234567", "Arduino SMS"))

after calling this function., it is now deprecated i dont know why?

kikiloaw: C:\Users\WINSDO~1\AppData\Local\Temp\arduino_8cb4b72e0bb726dc8b78e8327f92aca4\GSM_GPRSLibrary_SMS.ino: In function 'void loop()':

C:\Users\WINSDO~1\AppData\Local\Temp\arduino_8cb4b72e0bb726dc8b78e8327f92aca4\GSM_GPRSLibrary_SMS.ino:52:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if (sms.SendSMS("3471234567", "Arduino SMS"))

^

C:\Users\WINSDO~1\AppData\Local\Temp\arduino_8cb4b72e0bb726dc8b78e8327f92aca4\GSM_GPRSLibrary_SMS.ino:52:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

Those are warnings, not errors. Ignore these.

"Deprecated" means they might be warnings today, errors tomorrow.

but is it still up load to muC?

“Deprecated” is like an early warning system. You can ignore them, sure. But one day a new version of the IDE will come out with some feature you really, really need, such as support for a new board.

And that version might turn warnings into errors. Suddenly your code doesn’t compile at all. And you have had two years to fix the minor things the compiler is complaining about. Now you have 24 hours to fix them because your clients are screaming for you to fix some bug.

kikiloaw: but is it still up load to muC?

If it compiles without errors you can upload it.