Pass geolocation floats over Bluetooth LE

I know there are a lot of tutorials out there and different solutions. Anyway I would like to ask this question to get some guidance. I have made a script that is sending data from different readings from Arduino over Bluetooth LE to Android phone. I am currently sending only integers and it works fine with following command:

  Serial.print(voltageValue);
  Serial.print(",");   
  Serial.print(pressureValue);
  Serial.print(",");  
  Serial.print(gpsSpeed);

I am receiving GPS speed totally fine, as it is an integer. However I would like to get GPS coordinates as well. GPS coordinates readings are something like "65.34243" and "26.23432" so they must to be floats. Is there some solution to send these values over Bluetooth LE as well?

I am using Bluetooth 4.0

Serial.print(float_value,5); // to print 5 digits past the decimal point

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.