about gsm/gprs??

hello, I would like to ask for sending a sms via gsm/gprs shield can i do the following example to send a "sss111ccc" as a one sms

in setup char first[]="sss"; int second=111; //or char char third="ccc";

in loop sms.beginSMS(remoteNum); sms.print(first); sms.print(second); sms.print(third); sms.endSMS();

can i do the following example to send a "sss111ccc" as a one sms

One of the nice things about the Arduino is that it allows you to try things out very quickly. What happens when you try your code ?

One problem is that ccc will not fit into a single char but you can fix that.

Can you combine all three together for an sms? Yes.

String first = "sss"; int second=111; //or char String third="ccc";

String dataString = "";

dataString += first; dataString += String(second); dataString += third;

stoutfiles: Can you combine all three together for an sms? Yes.

String first = "sss"; int second=111; //or char String third="ccc";

String dataString = "";

dataString += first; dataString += String(second); dataString += third;

Nice try, but his variables are not Strings

Hi guys,

I have the same question. How can you add After a text is recieved by a GSM shield, I would like to send to my mobile a message containing a predefined text plus sender number:

1.   // get sender message
2.   sms.remoteNumber(senderNumber, 20);
3.   // send the message
4.   #define textMsg "Message recieved from: "
5.   sms.beginSMS(myNumber);
6.   sms.print(txtMsg); 
7.   sms.endSMS();

On line 6, after the predefined text I would like to add senders number. Can we do what hussein_alkhasraji did in his first post?

#define fist "This "
#define fist "is "
#define fist "it!"
sms.print(first)
sms.print(second)
sms.print(third)

This layout will count as a single sms "This is it!"? PS: I don't have a GSM test... I am kinda cold conding :fearful: until I get my hands on one of these. Thank you.

#define fist "This "
#define fist "is "
#define fist "it!"

Interesting. 3 different definitions of the word fist. I presume that you spelt it wrong it in the first line, copy/pasted it and forgot to change it.

In answer to your question, yes it should work, as long as you get the defines right, of course.

Yes, I ment to write: first, second and third :) Thank you very much for your answer and I wish you a Happy New Year.