<!DOCTYPE html>
<html lang="en">

<head>
	<% include layout.ejs %>

</head>

<body>

<% include ../public/html/header.html %>
<% include ../public/html/navbar.html %>

<div class="container">
<br>
<h1 class="text-center">ESP8266 Temperature Sensors</h1>

<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>
	<% for (var i = 0; i < query.length; i++){ %>
		<div class="col-lg-4">
			<h3><%=query[i]._id%></h3>
			<h4>Temperature: <%=query[i].temperature%>°F </h4>
			
			<% if (query[i].humidity != null) { %>
				<h4>Humidity: <%=query[i].humidity%>%</h4>
			<%}%>

			<span>Updated: <%=query[i].lastUpdate%></span>
			<br>
			<% if (query[i].connected){ %>
			<span class="colorGreen">Connected</span>
			<%} else {%>
			<span class="colorRed">Disconnected</span>
			<%}%>
			<br>
			<br>
			<a href="<%=query[i].info_link%>"><button class="btn btn-default">View Graph</button></a>
		</div>
	<%}%>

</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

<footer class="blog-footer">
	<p>Site created and managed by Mitchell Gerber</p>
	<span>©2015</span>
	<br>
	<span>Glyphicons provided by</span><br>
	<a href="http://glyphicons.com/" target="_blank"><span>glyphicons.com</span></a>
</footer>

</body>

	

	
	<% include layoutBottom.ejs %>

</html>

