Problema con - Problem with esp32 y sensor DHT11

Buenas noches comunidad, estoy realizando un proyecto con esp32 y el sensor DHT11. Adjunto el código que estoy intentando ocupar - Good evening community, I am doing a project with esp32 and the DHT11 sensor. I attach the code that I am trying to occupy

//Incluimos las librerias
#include "DHTesp.h"
//Decaramos el variable que almacena el pin a conectar el DHT11
int pinDHT = 15;
//Instanciamos el DHT
DHTesp dht;
void setup() {
  Serial.begin(115200);
  //Inicializamos el dht
  dht.setup(pinDHT, DHTesp::DHT11);
}
void loop() {
  //Obtenemos el arreglo de datos (humedad y temperatura)
  TempAndHumidity data = dht.getTempAndHumidity();
  //Mostramos los datos de la temperatura y humedad
  Serial.println("Temperatura: " + String(data.temperature, 2) + "°C");
  Serial.println("Humedad: " + String(data.humidity, 1) + "%");
  Serial.println("---");
  delay(2000);
}

Al compilar y subirlo ningún problema, pero al tener los resultados de la lectura me aparecen símbolos raros, he probado de todo pero aún así sigo sin encontrar el problema. adjunto imágenes de los símbolos. /// When compiling and uploading it, no problem, but when I have the reading results, strange symbols appear, I've tried everything but I still can't find the problem. I attach images of the symbols.

¿Alguien se le ocurre que puede ser? - Can anyone think of what it could be?

That is relative typical when the baud is wrong. Your picture shows 9600 Baud and you did the init at 115200 baud. Make them the same and it should work.

Eso es relativamente típico cuando el baudio es incorrecto. Su imagen muestra 9600 baudios e hizo el inicio a 115200 baudios. Hazlos iguales y debería funcionar.

1 Like

Perfecto ahí lo pude solucionar pero ahora me aparece ¿porque? - Perfect there I was able to solve it but now it appears why?

Moderador:
Por favor, lee las Normas del foro
Si posteas en el foro en inglés usa idioma inglés para expresarte.
Si escribes en español debes usar el foro Arduino en español.
Este mensaje lo envío porque tu hilo fue movido del foro en inglés y por eso tenemos una respuesta anterior en ese idioma.
A partir de ahora todos responden en español sin traducciones al inglés.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.