• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 HELTEC WITH DHT22

Q&A Forum › Category: ESP32 › ESP32 HELTEC WITH DHT22
0 Vote Up Vote Down
Rodrigo Fraga asked 7 years ago

I have ESP32 WIFI LORA 32 BOARD by Heltec and TTGO and both function with DHT22 when I use 12, 13 or 25 pins. But when I try to use 32 until 39 pins, the temperature and humidity can not read and show ZERO in serial monitor. Important that the sensor send a signal, I read with multimeter.

The pinout diagram is in: http://www.heltec.cn/download/WIFI_LoRa_32_Diagram.pdf
My sketch is simple:

#include <SimpleDHT.h>
byte pinDHT22 = 25;
float temperature = 0;
float humidity = 0;
SimpleDHT22 dht22;
void setup() {
Serial.begin(115200);
}
void loop() {
TEMPERATURA();
delay(2000);
}
void TEMPERATURA(){
dht22.read2(pinDHT22, &temperature, &humidity, NULL);
Serial.print(temperature);
Serial.print(” °C “);
Serial.print(humidity);
Serial.print(“% “);
}

Question Tags: ESP32 + DHT22
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 7 years ago

Hi Rodrigo.
Pins 32 to 39 are input only pins. They can be used as digital inputs or analog inputs. So, those pins won’t work with sensors that use communication protocols (as it requires a two-way communication).

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.