Apr 28, 2014 #1 H 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.
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.
Apr 28, 2014 #2 S shb264 Member level 1 Joined Oct 19, 2013 Messages 37 Helped 0 Reputation 0 Reaction score 0 Trophy points 6 Activity points 240 https://www.keil.com/support/man/docs/c51/c51_printf.htm - - - Updated - - - Try printf("hello world"); or Printf("AT+CMGS="+123456789");
https://www.keil.com/support/man/docs/c51/c51_printf.htm - - - Updated - - - Try printf("hello world"); or Printf("AT+CMGS="+123456789");
Apr 28, 2014 #3 mjasoj Junior Member level 2 Joined Nov 9, 2012 Messages 21 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,283 Activity points 1,423 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..!
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..!
Apr 29, 2014 #4 H 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 you just have to use null character - "/" To send the previous messages printf("\"hello world\""); printf("AT+CMGS=\"123456789\"");
you just have to use null character - "/" To send the previous messages printf("\"hello world\""); printf("AT+CMGS=\"123456789\"");
Apr 29, 2014 #5 E easy electronics Member level 3 Joined Mar 3, 2014 Messages 63 Helped 0 Reputation 0 Reaction score 0 Trophy points 6 Activity points 485 use this . Printf("AT+CMGS=\"+123456789\";");