Hello,
I’m using a photon with 5 webhooks. Those webhooks transfer the data to Thingspeak. And now to the problem, I want to use the main JSON file for a project. But I cant send all 5 at once, so I put a delay between every dataset. But now in the JSON file it tells me “null” at some fields.
Is there a way to send 5 webhooks at the same time to Thingspeak or another way to get rid of this problem?
Here is the part of my code, where it sends the data to thingspeak:
Particle.publish("biergartenSensor1", String(sen1), PRIVATE);
for(int i = 1; i < 4; i++){
digitalWrite(ledPin2, HIGH);
delay(100);
digitalWrite(ledPin2, LOW);
delay(100);
}
delay(30000);
Particle.publish("biergartenSensor2", String(sen2), PRIVATE);
for(int i = 1; i < 4; i++){
digitalWrite(ledPin2, HIGH);
delay(100);
digitalWrite(ledPin2, LOW);
delay(100);
}
delay(30000);
Particle.publish("biergartenSensor3", String(sen3), PRIVATE);
for(int i = 1; i < 4; i++){
digitalWrite(ledPin2, HIGH);
delay(100);
digitalWrite(ledPin2, LOW);
delay(100);
}
delay(30000);
Particle.publish("biergartenSensor4", String(sen4), PRIVATE);
for(int i = 1; i < 4; i++){
digitalWrite(ledPin2, HIGH);
delay(100);
digitalWrite(ledPin2, LOW);
delay(100);
}
delay(30000);
Particle.publish("biergartenSensor5", String(sen5), PRIVATE);
for(int i = 1; i < 4; i++){
digitalWrite(ledPin2, HIGH);
delay(100);
digitalWrite(ledPin2, LOW);
delay(100);
}
delay(30000);
An here is how my JSON looks like: