I have a u-blox gps module and I use TinyGPS (http://arduiniana.org/libraries/tinygpsplus/) to get out the lat + lng.
If i write...
Serial.println(gps.location.lat(), 6);
...out in the log I get the correct latvalue. Right now I however work with a BLE (https://www.adafruit.com/product/1697) and when I try to print it like this:
BTLEserial.print (gps.location.lat()`, 6);
I get a error: no matching function for call to 'Adafruit_BLE_UART::print(double, int)'
If I do this instead, the code runs...
BTLEserial.print ((gps.location.lat(),6));
But I do not get the correct lat, instead I get this value 6.00000000
I have tried to store the lat like this:
double myLat;
myLat = (gps.location.lat(), 6);
BTLEserial.print (myLat);
But with that myLat also has a value of 6.00000000
which is not correct.
I tried this as well:
char sValueOne[16], sValueTwo[16];
char sBuffer[33];
strcpy(sBuffer,dtostrf(((gps.location.lat(),6)), 15, 8, sValueOne));
strcat(sBuffer,",");
strcat(sBuffer,dtostrf(((gps.location.lng(),6)), 15, 8, sValueTwo));
BTLEserial.write((uint8_t *)sBuffer, strlen(sBuffer));
But with that I still get 6.00000000
. I am starting to run out of ideas now to make this work. I have tried to send it both directly and store it but nothing works successfully.
So how can I adjust the code to be able to print (or store) gps lat, lng value (TinyGPS++) with Bluetooth BLE nRF8001?
Appreciate every help and tips!
BTLEserial.print (gps.location.lng(),6);
i get a error:no matching function for call to 'Adafruit_BLE_UART::print(double, int)'