im new to the whole arduino world but i have been messing around with examples.
I have a tinysine gsm sim900 module and im wanting to receive texts but every example i have found and tried to use does not work. the example located here (http://arduino.cc/en/Tutorial/GSMExamplesReceiveSMS#.UxE-lvldWSo) gives me this error when i check the code.
sketch_feb28a:60: error: ‘sms’ was not declared in this scope
and “GSM_SMS sms;” is highlighted in the code
GSM_SMS is not located in my libraries
anyone have any other code i could try?
post your code?
did you import the library?
i was able to get texts using the following code, and use AT command AT+CMGL=“ALL” to receive my messages.
char incoming_char = 0;
// Initialize serial ports for communication.
Serial.println(“Enter your AT commands (with CR & NL)…”);
if(cell.available() > 0)
incoming_char = cell.read();
if((incoming_char >= ’ ') && (incoming_char<=‘z’))
if(incoming_char == 10)
if(Serial.available() > 0)
incoming_char = Serial.read();
[code] tags, and it looks like you didn’t declare the GSM library.
Have a look at this page:
Read all the libraries, use those instead, since your code seems to be using Serial…
If you want to use your own,
Add to the top of your code:
and add below that these lines:
Try it now.