Hi David ,
I use this code and it works well for me
#include <ESP8266HTTPClient.h>
.
//************ Bridges *********************//
String server_name = "http://fra1.blynk.cloud/external/api/"; // for French server
String Auth1 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // token for the receiving device 1
.
timer.setInterval(5000L, read_some_data); // call every 5 sec
.
.
.
.
// Bridge function
void BridgeRead(String token, int virtual_pin, float value_to_send) {
String server_path = server_name + "get?token=" + token + "&v" + String(virtual_pin);
http.begin(client, server_path.c_str()); //ESP8266
int httpCode = http.GET(); //get info
payload = http.getString(); //Get the request response payload
http.end(); //Close connection
fuel_level=payload.toInt(); // int conversion
Blynk.virtualWrite(V5, fuel_level); // write to widget
}
void read_some_data() {
BridgeRead(Auth1, 64, fuel_level); // Token , vPin , value
}