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?