Skip to content
Permalink
Browse files
Increase json data buffer
  • Loading branch information
Oliver Bell committed Nov 26, 2018
1 parent cbe2dc6 commit ca8b0df85bbd915bf065d3d3a7f199fa6e282928
Showing 1 changed file with 3 additions and 2 deletions.
@@ -92,13 +92,14 @@ void pollSensor()
data["pres"] = pres;
data["tempUnit"] = tempUnit == BME280::TempUnit_Celsius ? "c" : "f";
data["co2"] = co2;
data["ts"] = ntpClient.getEpochTime();

// Make json string
char dataBuffer[100];
char dataBuffer[255];
data.printTo(dataBuffer);

// Public string to this sensors topic
mqClient.publish(clientName.c_str(), dataBuffer);
mqClient.publish(("sensor/" + String(SENSOR_ID)).c_str(), dataBuffer);
}

void generateClientName()

0 comments on commit ca8b0df

Please sign in to comment.