Looking good
Moving creation of the "readings" variable into the function using it solved the memory leak issue.
Thanks again for all you do for this community!
// Get Sensor Readings and return JSON object
String getSensorReadings()
{
StaticJsonDocument<500> readings;
String jsonString;
readings["temperature"] = String(1.8*bme.readTemperature()+32);
readings["humidity"] = String(bme.readHumidity()+3.1);
readings["pressure"] = String(bme.readPressure()/3312.50);
readings["windspeed"] = String(windspeed);
serializeJson(readings, jsonString);
Serial.println(jsonString);
return jsonString;
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.