I tried it in differents combinatoins with this sketch but i receive no respond:
#include "SIM900.h" #include <SoftwareSerial.h> #include "sms.h" #include "string.h"
SMSGSM sms;
SoftwareSerial cell(10,11);
int numdata;
boolean started=false;
char smsbuffer[160];
char n[20];
int led1= 13;
int led2= 12;
int led3= 11;
int lastsmsbuffer;
int inchar;
void setup()
{
pinMode(11,OUTPUT);
pinMode(13,OUTPUT);
pinMode(12,OUTPUT);
//Serial connection.
Serial.begin(9600);
Serial.println("GSM Shield testing.");
//Start configuration of shield with baudrate.
//For http uses is raccomanded to use 4800 or slower.
if (gsm.begin(2400)){
Serial.println("\nstatus=READY");
started=true;
}
else Serial.println("\nstatus=IDLE");
/* if(started){
Enable this two lines if you want to send an SMS.
if (sms.SendSMS("3388296822", "Arduino SMS"))
Serial.println("\nSMS sent OK");
}*/
};
void loop()
{
if(started){
//Read if there are messages on SIM card and print them.
if(gsm.readSMS(smsbuffer, 160, n, 20))
{
Serial.println(n);
Serial.println(smsbuffer);
}
delay(1000);
}
Does anyone know how this module works and where i'm wrong? Ty for any help.
You have a Mega. Do NOT use SoftwareSerial on the Mega!
You have the TX and RX pins of the shield connected to some pins on the Mega - there are a total of 8 RX and TX pins on the Mega, two for each of the 4 hardware serial ports. Which pins is the shield connected to?
Dear PaulS,
Ty for reply. Now, as u said i'm wrong from the start, so i decided to start all over.
now, I've just plugged in my Shield on Arduino (Essentials Vcc and GND), na d even insert my SIM card into the shield. Now all the status LE are on but now i'm stuck. There are those 6 pins (3 RX and 3 TX) on the shield (Right corner) and i don't know what to do...
:
Yes, we have, you can send us an email to ask for the documents and we will send it to you
So I would start by asking for those documents.
It also looks like the yellow headers need two jumpers installed - from the middle to the left pins to use D0/D1, or from the middle to the right pins to use D7/D8. If you want to use hardware serial on the mega, then connect mega pins D7/D8 to whichever pins are used for Serial1, Serial2, or Serial3.
Dear CrossRoads,
I've done as u said: i've tried to contact the product customer for receive some datasheets of the shield...but they delet my request 3 times!!
So, i decided to follow your suggestion and i've putted 2 jumpers on center-right to enable D8 and D7, then I've connected them to Serial1 of Arduino MEGA (Pin 18 and 19).
now i want to test if it works...can u make 3/4 lines of program to make me test it? (sry for all these questions but this is my first time on a GSM /GPRS Shield an i really need it works because i have to create a project for my maturity exam).