mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
updated message on sensor page - removed humidity readings if null
This commit is contained in:
@@ -114,9 +114,14 @@ 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);
|
||||
|
||||
//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.
|
||||
var ctx = $("#" + chart_id).get(0).getContext("2d");
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user