Skip to content

Update docs to fix mixed use of DHT12 and DHT22 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 3 additions & 3 deletions markdown/dht.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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:

Expand Down