Page 1 of 1

publish_gps.ino sample code

Posted: Wed Jul 08, 2020 8:52 am
by watsys
In your example code, Connect-ESP32-GPS-MQTT/publish_gps.ino I found line 84 snprintf format issues, and I think a decimal point is missing, "m1=%lf;%lf" should read "m1=%.lf;%.lf" - I used this example to publish other sensor data and had to add the decimal point to get the corrrect no of decimal places. Is this right?

Re: publish_gps.ino sample code

Posted: Wed Jul 08, 2020 10:04 pm
by AskGuru
Hi watsys,

Normally you don't need to add the point to the variable. The actual code works fine.

Please take a look to this detailed guide: https://blog.asksensors.com/iot-cloud-b ... -6m-module/

Thank you.