This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Writting the Gps Coordinates to a file.

I am trying to extract the gps coordinates and use CoAP to sent the info to Telenor IoT server. I am using the gps demo  code provided by Nordic .

https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/gps 

I Tried to incorporate the CoAP code But got too many errors So i decided to print the coordinates to a txt file and read that file with CoAP.

httpshttps://github.com/ExploratoryEngineering/nrf9160-telenor/tree/master/samples/coap://github.com/ExploratoryEngineering/nrf9160-telenor/tree/master/samples/coap

That's a sample of what I wrote. The code compiles but no file is generated.

float x;
x = pvt_data->pvt.longitude ;
FILE *fp;
fp = fopen("Output.txt", "w");
fprintf(fp, "Gps coordinates: %f", x);
fclose(fp);

Parents Reply Children
No Data
Related