Using the DHT11 Temperature Sensor with Espruino on a NodeMCU
DHT11 Temperature Sensor
- There is a DHT11 module available for use
- Require the module using the Web IDE to download and install it.
- Set which data pin on the NodeMCU is connected to the data pin on the DHT11.
- Temperature is in Celsius, RH is in %.
- To convert from Celsius to Fahrenheit: F = (C * 1.8 + 32)
- Connect the VCC pin to a 3.3v power pin
- Connect the GND pin to a GND pin.
- Connect the Data pin to pin D4.
Bare vs. Shielded DHT11
- A DHT 11 with a shield has 3 pins.
- A bare DHT11 has 4 pins.
- In either case, 3vs4 pins, there are only 3 pins used: Signal, Vcc (+), Ground (-).
- The shielded, or PCB mounted, version includes a 10K Ohm pull up resistor for the signal line.