From 55f6c831862b9e66c2025dd8e35f2496aafa5c16 Mon Sep 17 00:00:00 2001 From: Joost Oostdijk Date: Sat, 1 Feb 2025 19:30:24 +0200 Subject: [PATCH] Update docs to fix mixed use of DHT12 and DHT22 --- README.md | 2 +- markdown/dht.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8a89aac..3d9608b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # AtomVM DHT Driver -The AtomVM Nif can be used to drive DHT11 and DHT12 temperature and humidity sensors that can be attached to ESP32 SoCs. +The AtomVM Nif can be used to drive DHT11 and DHT22 temperature and humidity sensors that can be attached to ESP32 SoCs. This driver is included as an add-on to the AtomVM base image. In order to use this driver, you must be able to build the AtomVM virtual machine, which in turn requires installation of the Espressif IDF SDK and tool chain. diff --git a/markdown/dht.md b/markdown/dht.md index 6be3c2f..c2d4c72 100644 --- a/markdown/dht.md +++ b/markdown/dht.md @@ -1,10 +1,10 @@ # DHT -The AtomVM DHT library can be used to drive DHT11 and DHT12 temperature and humidity sensors that can be attached to ESP32 devices. +The AtomVM DHT library can be used to drive DHT11 and DHT22 temperature and humidity sensors that can be attached to ESP32 devices. The AtomVM DHT library is only supported on the ESP32 platform. -> Note. The DHT11 and DHT12 are notoriously inaccurate temperature sensors, though they are cheap and may be good enough for simple applications. This driver uses bit banging on GPIO pins and may not make the best use of resources on your ESP32. Consider alternative temperature sensors, such as the SHT3x or Bosch BMP or BME line of sensors. +> Note. The DHT11 and DHT22 are notoriously inaccurate temperature sensors, though they are cheap and may be good enough for simple applications. This driver uses bit banging on GPIO pins and may not make the best use of resources on your ESP32. Consider alternative temperature sensors, such as the SHT3x or Bosch BMP or BME line of sensors. ## Build Instructions @@ -31,7 +31,7 @@ To start the DHT driver, use the `dht:start/1` function. Pass in a configuratio | Key | Value | Default | Required | Description | |-----|-------|---------|----------|-------------| | `pin` | `integer()` | none | yes | The data pin to which the DHT11 or DHT22 is connected. | -| `device` | `dht_11 \| dht_12` | `dht_11` | no | The device type (DHT11 or DHT12). | +| `device` | `dht_11 \| dht_22` | `dht_11` | no | The device type (DHT11 or DHT22). | For example: