diff --git a/globoSonda/examples/esp8266_PruebaGPS/esp8266_PruebaGPS.ino b/globoSonda/examples/esp8266_PruebaGPS/esp8266_PruebaGPS.ino index b573257..598c4b9 100644 --- a/globoSonda/examples/esp8266_PruebaGPS/esp8266_PruebaGPS.ino +++ b/globoSonda/examples/esp8266_PruebaGPS/esp8266_PruebaGPS.ino @@ -2,11 +2,11 @@ //librerias propias-------------------- #include -#define PIN_POWERKEY_SIM808 48 +#define PIN_POWERKEY_SIM808 16 #define PIN_RX_SIM808 4 #define PIN_TX_SIM808 5 Sim808Manager sim808; -SoftwareSerial sserial=SoftwareSerial(PIN_RX_SIM808, PIN_TX_SIM808,false); +SoftwareSerial sserial(PIN_RX_SIM808, PIN_TX_SIM808,false); char buf[1024]; void setup() { @@ -14,13 +14,10 @@ void setup() { Serial.println("Iniciando"); if(!sim808.inicia(&sserial, PIN_POWERKEY_SIM808, 9600)) { - Serial.println("Sim808 join network error"); + Serial.println("Error al iniciar modulo gps"); } - Serial.println("GPS iniciado..."); - DataGPSSimManager* coor=sim808.GetGPSValid(); - Serial.println("gps iniciado..."); - - + else + Serial.println("GPS iniciado..."); } @@ -32,14 +29,17 @@ void loop(){ Serial.print(strFecha); Serial.print(" lon: "); Serial.print(coor->lon); - Serial.print("lat: "); - Serial.println(coor->lat); + Serial.print(" lat: "); + Serial.print(coor->lat); Serial.print(" altitud: "); Serial.print(coor->altitude); - Serial.print("velocidad: "); + Serial.print(" velocidad: "); Serial.print(coor->speed_kmh); - Serial.print("precision: "); + Serial.print(" precision: "); Serial.print(coor->getPrecision(precision)); - delay(20000); + Serial.print(" nsat: "); + Serial.println(coor->nSatelites); + + delay(2000); }