Hi.
You can either convert on the main.cpp file on the server side or on the client side using JavaScript.
In the client side (ESP32 or ESP8266), you can do the conversion in the getSensorReadings() function (see the line highlighted in bold:
String getSensorReadings(){
readings["temperature"] = String(1.8*bme.readTemperature()+32
);
readings["humidity"] = String(bme.readHumidity());
readings["pressure"] = String(bme.readPressure()/100.0F);
String jsonString = JSON.stringify(readings);
return jsonString;
}
Let me know if this works for you.
Also, can you tell me how are you feeling about this new eBook? Is it easy to follow? Is there any topic that you would like to be covered in a future version?
Regards,
Sara
Good Evening,
Thanks for the information on the temperature conversion. I have modified my code and it is working correctly.
This is the first book that I have purchased. I am finding the book easy to follow. I would have liked more information about SPIFF and LittleFS. I would have liked more information about where the informarion is saved on the ESP8266. I have been looking online for more information oabout this subject, however have not found what I am looking for.
I think the book is very interestimg and looks forward to additions to the book and also purchasing additional booke.
Good Job
Thanks