user29222: 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!

user13432: The Arduino Stream/Print classes may sometime need some extra attention.
BTLEserial.println(gps.location.lat()`, 6); 

The member function is available in the class Print but gets "hidden". You can help the compiler to find it with a prefix:
BTLEserial.Print::println(gps.location.lat()`, 6); 

Cheers!

29222: <p>I have a u-blox gps module and I use TinyGPS (<a href="http://arduiniana.org/libraries/tinygpsplus/" rel="nofollow noreferrer">http://arduiniana.org/libraries/tinygpsplus/</a>) to get out the lat + lng.</p>

<p>If i write... </p>

<pre><code>Serial.println(gps.location.lat(), 6); 
</code></pre>

<p>...out in the log I get the correct latvalue. 
Right now I however work with a BLE (<a href="https://www.adafruit.com/product/1697" rel="nofollow noreferrer">https://www.adafruit.com/product/1697</a>) and when I try to print it like this:  </p>

<pre><code>BTLEserial.print (gps.location.lat()`, 6); 
</code></pre>

<p>I get a error: <code>no matching function for call to 'Adafruit_BLE_UART::print(double, int)'</code></p>

<p>If I do this instead, the code runs...</p>

<pre><code>BTLEserial.print ((gps.location.lat(),6)); 
</code></pre>

<p>But I do not get the correct lat, instead I get this value <code>6.00000000</code></p>

<p>I have tried to store the lat like this:</p>

<pre><code>double myLat;

myLat = (gps.location.lat(), 6);
BTLEserial.print (myLat);
</code></pre>

<p>But with that myLat also has a value of <code>6.00000000</code> which is not correct.</p>

<p>I tried this as well:</p>

<pre><code>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));
</code></pre>

<p>But with that I still get <code>6.00000000</code>. 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.</p>

<p>So how can I adjust the code to be able to print (or store) gps lat, lng value (TinyGPS++) with Bluetooth BLE nRF8001?</p>

<p>Appreciate every help and tips!</p>
 13432: <p>The Arduino Stream/Print classes may sometime need some extra attention.</p>

<pre><code>BTLEserial.println(gps.location.lat()`, 6); 
</code></pre>

<p>The member function is available in the class Print but gets "hidden". You can help the compiler to find it with a prefix:</p>

<pre><code>BTLEserial.Print::println(gps.location.lat()`, 6); 
</code></pre>

<p>Cheers!</p>
