Add ES8266 temp and humidity post

This commit is contained in:
glyph 2020-06-14 19:19:51 +01:00
parent e2d7fafccb
commit 63875daddf
4 changed files with 33 additions and 0 deletions

View File

@ -79,6 +79,15 @@ fn computers() -> Template {
Template::render("computers", &context)
}
#[get("/computers/esp8266-dht11")]
fn computers_esp8266_dht11() -> Template {
let context = FlashContext {
flash_name: None,
flash_msg: None,
};
Template::render("computers/esp8266_dht11", &context)
}
#[get("/computers/rust-compilation")]
fn computers_rust_compilation() -> Template {
let context = FlashContext {
@ -209,6 +218,7 @@ fn main() {
bacteria_sauerkraut_beginnings,
bacteria_sauerkraut_bottled,
computers,
computers_esp8266_dht11,
computers_rust_compilation,
fungi,
fungi_grow_together,

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -3,6 +3,7 @@
<h2>Computers</h2>
<ul>
<li><a href="/computers/rust-compilation">Cross-Compiling Rust for Debian Buster on Raspberry Pi 3B+</a> - <i>18 May, 2020</i></li>
<li><a href="/computers/esp8266-dht11">ESP8266 with DHT11 and LCD Display</a> - <i>5 August, 2019</i></li>
</ul>
<hr>
{%- endblock %}

View File

@ -0,0 +1,22 @@
{% extends "nav" %}
{% block content %}
<article>
<h2>ESP8266 with DHT11 and LCD Display</h2>
<i>5 August, 2019</i>
<p>I had fun putting together a simple electronics project over the weekend: NodeMCU dev board (ESP8266) with a DHT11 temperature and humidity sensor and DF Robot RGB LCD display.</p>
<figure>
<img src="/computers/esp8266_temp.jpeg" alt="Black and white photo in portrait orientation showing electronics on a striped table-cloth. A NodeMCU dev board appears in the lower-right, DHT11 sensor in the top-left, and an LCD in the top-right. Text on the display reads: temp: 18.0 and humidity: 64. The display is propped-up by a white pyramid (mycelium) and a wooden floor is just visible in the background." style="width: 100%;" />
<figcaption>The basic setup</figcaption>
</figure>
<p>The code is quite simple: connect to the local WiFi network and create a UDP server. Respond to UDP requests on port 3210 with a temperature and humidity reading from the sensor. Write the temperature and humidity to the display every two seconds.</p>
<p>Arduino (C++) code: <a href="https://github.com/mycognosist/esp8266_dht11_udp">mycognosist/esp8266_dht11_udp</a></p>
<p>Ill be using this setup to monitor environmental conditions in my cultivation space. I plan on doing another version with LoRa for the main lab up the road. Will be great to do some remote-sensing from the comfort of my living room.</p>
<p>One thing you cant see in the photo is the sweet pink pastel backlight. Id been thinking about lunarpunk aesthetics (thanks to a post by @Jackalope) - and, in particular, how I associate pastel tones with lunarpunk. I wanted to try out pastel colours on this display and ended up checking out the Wikipedia entry on Pastel (color). Lo and behold, it mentions:</p>
<blockquote cite="https://en.wikipedia.org/wiki/Pastel_(color)">
<p>There is also a type of goth style called pastel goth which combines the pastel color palette with classical goth fashion elements.</p>
<footer>- <a href="https://en.wikipedia.org/wiki/Pastel_(color)"><cite>Pastel (color) Wikipedia page</cite></a></footer>
</blockquote>
<p>I did not know that. Rad.</p>
</article>
<hr>
{%- endblock %}