Hello guys! I would like to ask you something.
I've bought the new 3g-GPS shield from cooking-hacks before 2 weeks.
The matter is that i can understand something.I want the simplest example to retrieve the IMEI of the GSM. OK until now??
I'm using Arduino MEGA 2560 and the new 3g-GPS shield.
I've done a very simple code
int led = 13;
int onModulePin = 2; // the pin to switch on the module (without press on button)
int x;
char data[400];
String iStr = "";
void switchModule(){
digitalWrite(onModulePin,HIGH);
delay(2000);
digitalWrite(onModulePin,LOW);
}
void setup(){
Serial.begin(115200); // UART baud rate
delay(2000);
pinMode(led, OUTPUT);
pinMode(onModulePin, OUTPUT);
switchModule(); // switches the module ON
Serial.println("ATI");
delay(100);
}
void loop(){
Serial.flush();
x=0;
do{
do{
digitalWrite(led,HIGH);
}
while(Serial.available()==0);
digitalWrite(led,LOW);
data[x]=Serial.read();
Serial.print(data[x]);
x++;
}
while(Serial.read()!='K');
}
I've got the jumpers on the left side both of them. The results is nothing.Some times i'm reading something but garbages. Nothing else nothing more.
Please help me with a link or something else because i've lost my sleep. I don't want to give up.
Thanks!