[51] sending text message using printf in C51

Status
Not open for further replies.

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
How do I send a text message with quotes using printf?

example: printf(""hello world");

or

Printf("AT+CMGS="+123456789"");

I get syntax error on keil C51.
 

I think It would not work both ways. I use to save the string (like AT+CMGS="+123456789") to a variable and use that variable name to print values
Hope this Helps..!
 

you just have to use null character - "/"

To send the previous messages

printf("\"hello world\"");

printf("AT+CMGS=\"123456789\"");
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…