Pages: [1]   Go Down
Author Topic: sms.read()  (Read 614 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to follow the SMS read tutorial and don't understand the following line:
Code:
// Read message bytes and print them
    while(c=sms.read())
      Serial.print(c);

What is c exactly? Is it each character from the message being printed individually or all of them in a character array? How could I combine all the characters into a character sequence. Any explanation would be appreciated.
Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

c is a char that is read from circular buffer of the library. c is each character.

When you receive a SMS message, it content is saved in a circular buffer to be read by sketch.
Logged

Pages: [1]   Go Up
Jump to: