Sending data from Blynk to thingspeak with Bluetooth

Hi, I’m creating an sensor network using an Arduino Uno and an Open-Smart bluetooth module. As part of this project it is required that the arduino will send temperature/humidity and light sensor readings via bluetooth to be displayed in Blynk. The sensor readings also need to be display in a thingspeak channel I’ve created. I have tried to do this by using the webhook widget. When i run the project, the number of entries updates as expected, however on the graphs, it is displaying the sensor readings as 0. This is the code I have:

#define BLYNK_PRINT Serial

#include <BlynkSimpleSerialBLE.h>
#include <BLEPeripheral.h>
#include <SoftwareSerial.h>;
#include <DHT.h>

// Auth Token recieved in the Blynk App.
char auth[] = "XXXXXXXXXXXXXXX";

// create ble serial instance
SoftwareSerial SerialBLE(10, 11);   // Rx, Tx

#define DHTPIN 13          // Pin DHT22 is connected to
#define ldrPIN A0          // Pin LDR is connected to

#define DHTTYPE DHT22   // DHT 22

float t;
float h;
float ldr;

BlynkTimer timer;

void setup()
  // Debug console

  Blynk.begin(SerialBLE, auth);

  Serial.println("Waiting for connections...");


  // Setup a function to be called every 5 second
  timer.setInterval(10000, sendSensor);
  timer.setInterval(10000, sendLDR);

  timer.setInterval(30000, SendtoThingspeak);
  Blynk.virtualWrite(V3, "t", "h", "ldr");

void loop()
void sendSensor()
  float h = dht.readHumidity();
  float t = dht.readTemperature();

// Write DHT22 values to Blynk
  Blynk.virtualWrite(V4, h);
  Blynk.virtualWrite(V5, t);

void sendLDR()
  float ldr = analogRead(ldr);

 // Write LDR values to Blynk
  Blynk.virtualWrite(V6, ldr);

void SendtoThingspeak(void)
  Blynk.virtualWrite(V3, h, t, ldr);

In Blynk I’ve the webhook set up as:

Output: V3
URL: http://[0]/&field2=/pin[1]/&field3=/pin[2]/
Method: GET
Content type: application/json
Body: empty

Any help would be seriously appreciated.

1 Like

Please remember to properly format your posted code… I fixed your last post.

I read it and I would make it too, did you solve problem now?
I’m new and im not able to make it alone.
Can you share a code corrected for try to use it please?
Thanks a lot .