website/templates/computers/esp8266-dht11.html

20 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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="/static/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>