Go Down

Topic: [b]HELP with GSM Shield and Arduino MEGA[/b] (Read 1 time) previous topic - next topic

icom5217

Hey Guys,

I'm trying to send a text message to a phone using Sparkfuns SM5100B GSM Shield. I have connected 5V, GND, Arduino PIN 19 to D2 Pin of GSM Shield, Arduino PIN 18 to D3 Pin of GSM Shield and am using the following code:
Code: [Select]
/*  Example 26.3 GSM shield sending a SMS text message
http://tronixstuff.com/tutorials > chapter 26 */

char mobilenumber[] = "6625980087";  // Replace xxxxxxxx with the recipient's mobile number
void setup()
{  //Initialize serial ports for communication.
Serial1.begin(9600);
Serial.begin(115200);
delay(35000); // give the GSM module time to initialise, locate network etc.
// this delay time varies. Use example 26.1 sketch to measure the amount
// of time from board reset to SIND: 4, then add five seconds just in case
}
void loop()
{
Serial1.println("AT+CMGF=1"); // set SMS mode to text
Serial1.print("AT+CMGS=");  // now send message...
Serial1.print(34,BYTE); // ASCII equivalent of "
Serial1.print(mobilenumber);
Serial1.println(34,BYTE);  // ASCII equivalent of "
delay(500); // give the module some thinking time
Serial1.print("They call me the count... because I like to count! Ah ha ha ha");   // our message to send
Serial1.println(26,BYTE);  // ASCII equivalent of Ctrl-Z
delay(15000); // the SMS module needs time to return to OK status
do // You don't want to send out multiple SMSs.... or do you?
{
delay(1);
Serial.println("LOOPING");
}
while (1>0);
}

I get to see the "LOOPING" on serial terminal but never actually get the txt message... can someone tell me what I am doing wrong ? Am i connecting the shield correctly ?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy