I am trying to utilize sim 808 gps module with arduino uno to make a gps system for just getting the latitude and longitude but the first problem that i am facing is that the gps antenna doesn't seems to respond to signals in an indoor environment but it shows the normal "location 3D fixed" in an outdoor environment.So, is there any way by which i can resolve this problem ?
The Second problem is that as i want to send these location coordinates as a message to a mobile phone therefore i will have to combine a selected part of response of the AT command for location which i don't know how to do . I have already prepared the messaging system using the gsm functionality of sim 808 but that combination thing is posing a problem .
So, is there any way by which i can resolve this problem ?
Of course. All you need to do is buy a GPS satellite to put in the room with the device. Where do you think the data that they get comes from?
but that combination thing is posing a problem .
So, you aren't going to show us the code OR describe that the problem that it is posing is. Well, that's fine, as long as you don't really expect help.
SoftwareSerial mySerial(10, 11); // RX, TX
int val = 0;
void setup() {
// set the data rate for the ARDUINO and SoftwareSerial port
Serial.begin(9600);
mySerial.begin(9600);
pinMode(2, INPUT_PULLUP);
// Open serial communications and wait for port to open:
Serial.println("Starting the gsm and gps communication");
mySerial.println("AT"); // To check the correct interfacing with sim808(gsm module)
delay(2000);
mySerial.println("AT+CGPSPWR=1");
delay(1000);
mySerial.println("AT+CGPSRST=1");
delay(1000);
mySerial.println("AT+CGPSINF=0");
delay(1000);
mySerial.println("AT+CSCS="GSM""); // setting for english only message
delay(500);
mySerial.println("AT+CMGF=1"); // set the module in text message mode
delay(500);
mySerial.println("AT+CMGS="mobile number""); // to send message at a particular number
delay(500);
mySerial.println("message"); // specifying text for the message
// mySerial.write(0x1A);
}
void loop() { // run over and over
if (mySerial.available()) { //if there is some data available on pin 10 or 11 then it'll show on serial monitor.
Serial.write(mySerial.read());
}
if (Serial.available()) { // allows to write AT commands during execution of programme or in case of any error
mySerial.write(Serial.read());
}
val = digitalRead(2); //Serial.println(val);
if (val==0) { // condition for triggering the message //Serial.println(val);
mySerial.write(0x1A); // hex code for Ctrl+Z
}
//}
}
This is the code that i am using but the problem that i am encountering is in including the output of AT+CGPSINF command which gives the current location information in the message as i am not aware of the data type in which we get the response of AT+CGPSINF.
i am using AT commands as i am using sim808 gps module with arduino uno to make this gps system