Skip to content

An exploration of the Rust programming language for embedded systems. A DHT11 temperature/humidity sensor controls the state of an LED to indicate whether a room is suitable for PLA filament storage.

Notifications You must be signed in to change notification settings

benmahomie/temperature_monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

As a software engineer with an interest in embedded systems, I wanted to see how I could use Rust to create a simple temperature monitor.

The software is a Rust program I designed to control LEDs based on temperature and humidity readings. It reads these values from a DHT11 sensor through a Python script.

The LEDs indicate:

Temperature LED

  • On: If temperature is between 15°C and 30°C.
  • Slow Blink: If temperature is below 15°C.
  • Fast Blink: If temperature is above 30°C.

Humidity LED

  • On: If humidity is above 50%.

I created this software primarily to learn a little more about the Rust language, but also to create a tool that could help me visually in remotely monitoring room conditions for my 3d printer. The temperature ranges and humidity threshold are recommended thresholds for PLA filament. If the filament is outside these thresholds, it can become damaged.

Software Demo Video

Development Environment

Both the Rust code and Python helper were made using the VSCode IDE. The Rust code could not be tested in my development environment, so it was transferred to the Pi Zero W via SCP and then run from the command line via SSH. SCP and SSH connections were done through connection to a personal 2.4GHZ hotspot.

Languges used were Rust, used in src/main.rs, and Python, used as a translator tool for the DHT11 sensor module.

Useful Websites

These websites helped me understand how to connect my DHT11 to my Raspberry Pi Zero W. I learned more about the capabilities of the Rust language from ChatGPT and the Rust Playground.

Future Work

The following still need to be improved:

  • LEDs are too weak to see from a monitoring camera
  • Python helper script could get a Rust replacement with lots of work and info

About

An exploration of the Rust programming language for embedded systems. A DHT11 temperature/humidity sensor controls the state of an LED to indicate whether a room is suitable for PLA filament storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published