Communication problems with the Arduino Mega 2560 with the DHT-11 sensor.

I have the 2560 mega arduino kit and want to communicate with the DHT-11 temperature sensor.

I downloaded his library and insert it into the libraries of my compiler.

I made the following command lines:

#include <dht.h>

#define dht_dpin A5

dht DHT;

void setup () {

Serial.begin (9600);
delay (1000);

}

void loop () {
DHT.read11 (dht_dpin);
Serial.print ("Humidity:");
Serial.print (DHT.humidity);
Serial.println ("%");
Serial.print (DHT.temperature);
Serial.print ("Celsius");

delay (2000);

}

The following message appeared:

WARNING: The DHTlib library claims to run on architecture (s) (atmelavr) and may be incompatible with your current board, which runs in architecture (s) (avr).
The sketch uses 4772 bytes (1%) of storage space for programs. The maximum is 253952 bytes.
Global variables use 235 bytes (2%) of dynamic memory, leaving 7957 bytes for local variables. The maximum is 8192 bytes.

Is this sensor incompatible with my mega arduino 2560?

Post a link to the DHT library you're using! There are about a dozen of them. And learn to use code tags!

The link where I downloaded the library was this: https://portal.vidadesilicio.com.br/wp-content/uploads/2017/05/DHTlib.zip

atmelavr and avr are the same platforms. I guess the renaming occurred because Microchip acquired Atmel some time ago. The author explicitly states that the library runs on a Mega2560.

Does the sketch work for you? Otherwise: how did you connect the DHT to the Arduino? Wiring diagram?

The electrical connection I made correctly. I will download other libraries and go testing to see if I can communicate.