1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 10:22:53 +00:00

updated message on sensor page - removed humidity readings if null

This commit is contained in:
2016-03-04 00:34:29 -06:00
parent 03182204e0
commit 260ddc14ff
2 changed files with 7 additions and 4 deletions

View File

@@ -114,7 +114,12 @@ function displayChart(chart_id, chart_legend_id, year, month){
data.datasets[0].data.push(json[i].max);
data.datasets[1].data.push(json[i].min);
data.datasets[2].data.push(Math.ceil(json[i].humidity));
//add humidity to chart if it is not null in the database query
if (json[i].humidity != null){
data.datasets[2].data.push(Math.ceil(json[i].humidity));
}
}
// Get context with jQuery - using jQuery's .get() method.

View File

@@ -15,9 +15,7 @@
<br>
<h1 class="text-center">ESP8266 Temperature Sensors</h1>
<p><span class="colorRed">Note:</span> I am still experimenting with these sensors. It seems that the sensors will have a bad reading every once in while.
For example the low every day for the Grand Meadow sensor is 33.8. From observing the data, it randomly jumps to 33.8 one out of about every few hundred readings or so.
I will continue to investigate this problem when I can get my hands on the sensor as it is currently in my home town.
<p><span class="colorRed">Note:</span> I am using a DHT11 analog sensor for both temperature and humidity readings. I am also using a DS18B20 digital sensor, which only takes temperature readings. The digital sensor seems to get more accurate readings. Some of the data may be inconsistent as this is an experimental process.
</p>
<hr>