STM32 with DHT22 sensor
Find a file
2025-04-10 17:13:53 -04:00
Core refactor: revise function names 2025-03-04 18:49:43 -05:00
Drivers Add project files 2025-03-03 15:00:02 -05:00
Images docs: update README and add images 2025-04-10 17:13:53 -04:00
.gitignore Initial commit 2025-02-27 12:48:09 -05:00
.mxproject Add project files 2025-03-03 15:00:02 -05:00
.project Add project files 2025-03-03 15:00:02 -05:00
LICENSE Initial commit 2025-02-27 12:48:09 -05:00
README.md docs: update README and add images 2025-04-10 17:13:53 -04:00
stm32f4-dht22-uart.ioc Add project files 2025-03-03 15:00:02 -05:00
STM32F446RETX_FLASH.ld Add project files 2025-03-03 15:00:02 -05:00
STM32F446RETX_RAM.ld Add project files 2025-03-03 15:00:02 -05:00

STM32-DHT22-UART

This project demonstrates how to use a STM32 microcontroller with a DHT22 temperature and relative humidity sensor. Data from the sensor is transmitted asynchronously via UART and can be viewed on a serial console or in a terminal emulator.

Terminal with repeating updates to temperature and relative humidity

A STM32 Nucleo board, DHT22 sensor, and breadboard

Using Terminal Emulators

  1. Determine which tty device represents your STM32, on this system it's ttyACM0 for example
  2. Set the baud rate: stty -F /dev/ttyACM0 115200
  3. View the output: cat /dev/ttyACM0

UML Sequence Diagram

Initialize the sensor, read the data, validate the date, then send via UART

References