Problem with Ublox NEO-6M GPS

Thread Starter

Alies

Joined Feb 17, 2023
1
hello
i have web server and i make database in mysql
everything is fine and work in script but when i try to add NEO-6M GPS in script i get this message in serial monito

Code:
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset

stack>>>

ctx: cont
sp: 3ffffcd0 end: 3fffffd0 offset: 01a0
3ffffe70: 3fffdad0 0000001e 3ffee7f0 40204adc
3ffffe80: 3fffdad0 3ffee5fc 3ffee6fc 4020152e
3ffffe90: 00000020 40202e10 00000000 00000000
3ffffea0: 4020300d 40202fea 3ffe888c 00000022
3ffffeb0: 4000050c 40100800 3fffc258 4000050c
3ffffec0: 4020642c 00000030 00000010 ffffffff
3ffffed0: 4020645f 00000000 00000001 00000001
3ffffee0: 00000000 00000000 00000001 00000008
3ffffef0: 40207e20 ffffffff 00000000 3ffee86c
3fffff00: 00000000 3fffdad0 3ffee898 00000030
3fffff10: ffffff00 00ffffff 00000020 40101088
3fffff20: 00696c41 00000001 0000001c 00000001
3fffff30: 3ffef824 40203f7c 00000020 00000001
3fffff40: 30696c61 30303730 00000037 40101088
3fffff50: feefeffe 00000001 00000003 3ffee898
3fffff60: 40207068 00000003 00000004 40207014
3fffff70: 401004d0 3ffee6fc feefeffe feefeffe
3fffff80: 00000000 00000001 3ffee681 00000002
3fffff90: 00000000 3ffee7b0 00000001 3ffee898
3fffffa0: 3fffdad0 00000000 3ffee86c 3ffee898
3fffffb0: 00000000 00000000 3ffee86c 4020645c
3fffffc0: feefeffe feefeffe 3fffdab0 40101321



my script


C++:
#include
#include <ESP8266HTTPClient.h>
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
WiFiClient client;
static const int RXPin = 4, TXPin = 3;// Here we make pin 4 as RX of arduino & pin 3 as TX of arduino
static const uint32_t GPSBaud = 9600;

SoftwareSerial ss(RXPin, TXPin);
TinyGPSPlus gps;
const char* ssid = "0000";
const char* password = "000000";

const char* serverName = "http://0000000.com/pro5/post-data.php";

String apiKeyValue = "00000000";

String sensorName = "Distance sensor";
String sensorLocation = "office";

long duration;

void setup()
{
pinMode(PulseSensorPurplePin, OUTPUT);
Serial.begin(9600);
ss.begin(GPSBaud);
WiFi.begin(ssid, password);

}

void loop()
{

if(WiFi.status()== WL_CONNECTED){
HTTPClient http;

http.begin(client,serverName);

http.addHeader("Content-Type", "application/x-www-form-urlencoded");


String httpRequestData = "api_key=" + apiKeyValue + "&SensorData=" + sensorName
                      + "&LocationData=" + sensorLocation + "&value1=" + duration
                      + "&value2=" +duration + "&value3=" + "NULL" + "";


Serial.println(duration);


int httpResponseCode = http.POST(httpRequestData);

http.end();
}
delay(1000);
if (ss.available() > 0)
if (gps.encode(ss.read()))
displayInfo();

if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
while(true);
}
}

void displayInfo()
{
Serial.print(F("Location: "));
if (gps.location.isValid())
{
Serial.print(gps.location.lat(), 6);
Serial.print(F(","));
Serial.print(gps.location.lng(), 6);
}
else
{
Serial.print(F("INVALID"));
}

Serial.println();
}
i try to make GPS sending location to my database
i use NodeMCU Wireless Module CH340 WiFi IoT
thanks
 
Top