BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk GPS stream

Hi.
Just 2 quick questions as I can not find anything on google.
I am trying to make a fuel computer for my boat engine where I use the GPS stream widget to calculate my fuel consumption (L/km) or (L/nautical mile). The problem is that I don’t know the units coming from the GPS widget…is it mph/kmt/ms?

And…do i need to call the “GPS” or does BLYNK push the GPS data to my hardware by itself?
esp32 with BLE connection.

I think it could have something to do with my language settings or destination? (From Norway (SI units), using UK as default language)


BLYNK_WRITE(V7)  // is this all I need?
{
   Serial.println("speed is synced");
   speed_mps = param[3].asFloat();  // mph / kmt ??
}

//DO I NEED A TIMER TO UPDATE (V7)?? 
timer.setInterval(1000, UPDATE_SPEED) // ???

void UPDATE_SPEED(){
Blynk.syncVirtual(V7)
}

I have not used the GPS widget too much, but I believe it is retrieving the GPS data from your phone (i.e. device that the app/widget is installed on). So the units may be dependent on the device, device settings, etc… In the DOCS it states “speed could often be 0 in case smartphone doesn’t support it”.

Maybe you could take it for a test run in your car, and check against the speedometer. This may give an indication of the units.

As for, does BLYNK push the GPS data. I believe it does, as there is an update interval selection in the widget. Although, I am only able to access it when I set the battery consumption to “High Accuracy”. With the other battery consumption settings, update interval seems to flash quickly and then disappear. I am using Android, so depending on your operating device this may/may not be the case. Maybe others can confirm if this happens with them, and if this is how it is supposed to function Or if it is a bug. Again I have limited experience with this widget.

1 Like