I have made simple web server on NodeIde with temperature sensor from this link DS18B20 Sensor Interfacing with Nodemcu | NodeMCU . When i open web server on browser it works normal, but when i open on this app
it doesnt show the page, but html code inside the char. How it work on browser but not on app? Do i need to change to seperate html,style,json files or is there a simple way to change this in App inventor?
html.h code:
const char html_page[ ] PROGMEM = R"rawSrting(
<!DOCTYPE html>
<html>
<style>
body {font-family: sans-serif;}
h1 {text-align: center; font-size: 30px;}
p {text-align: center; color: #4CAF50; font-size: 40px;}
</style>
<body>
<h1>DS18B20 Temperature Monitoring With Nodemcu</h1><br>
<p>Temperature: <span id="TempValue">0</span>°C</p><br>
<script>
setInterval(function() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("TempValue").innerHTML = this.responseText;
}
};
xhttp.open("GET", "readTemp", true);
xhttp.send();
},50);
</script>
</body>
</html>
)rawSrting";