Compilation error: no matching function for call to 'DHT::DHT()'

I LITERALLY DELETED EVERY SINGLE LIBRARY WITH SAME DHT.H FILE AND IT STILL SAYS IT.
HERES CODE:

/***************************************************************************************
    Name    : LCD Button Shield Menu
    Author  : Paul Siewert
    Created : June 14, 2016
    Last Modified: June 14, 2016
    Version : 1.0
    Notes   : This code is for use with an Arduino Uno and LCD/button shield. The
              intent is for anyone to use this program to give them a starting
              program with a fully functional menu with minimal modifications
              required by the user.
    License : This program is free software. You can redistribute it and/or modify
              it under the terms of the GNU General Public License as published by
              the Free Software Foundation, either version 3 of the License, or
              (at your option) any later version.
              This program is distributed in the hope that it will be useful,
              but WITHOUT ANY WARRANTY; without even the implied warranty of
              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
              GNU General Public License for more details.
 ***************************************************************************************/

/*
   This program is designed to get you as close as possible to a finished menu for the standard Arduino Uno LCD/button shield. The only required modifications
   are to add as menu items to the master menu (menuItems array) and then modify/adjust the void functions below for each of those selections.
*/
#include <DHT.h>
DHT dht;
double tempF = 0;
int LED = 52;
int buzzerPin = 22;
int c = 261;
int d = 293;
int e = 329;
int f = 349;
int g = 391;
int a = 440;
int Bb = 466;
int b = 493;
int hogeC = 523;
int achtste = 500 / 2;
int kwart = 1000 / 2;
int half = 2000 / 2;
const int LCD_NB_ROWS = 2;
const int LCD_NB_COLUMNS = 16;

byte customChar[123] = {
  B01010,
  B01010,
  B01010,
  B00100,
  B10001,
  B10001,
  B01010,
  B00100
};

/* Caractères personnalisés */
byte DIV_0_OF_5[8] = {
  B00000,
  B00000,
  B00000,
  B00000,
  B00000,
  B00000,
  B00000,
  B00000
};  // 0 / 5

byte DIV_1_OF_5[8] = {
  B10000,
  B10000,
  B10000,
  B10000,
  B10000,
  B10000,
  B10000,
  B10000
};  // 1 / 5

byte DIV_2_OF_5[8] = {
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000,
  B11000
};  // 2 / 5

byte DIV_3_OF_5[8] = {
  B11100,
  B11100,
  B11100,
  B11100,
  B11100,
  B11100,
  B11100,
  B11100
};  // 3 / 5

byte DIV_4_OF_5[8] = {
  B11110,
  B11110,
  B11110,
  B11110,
  B11110,
  B11110,
  B11110,
  B11110
};  // 4 / 5

byte DIV_5_OF_5[8] = {
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111
};  // 5 / 5


/**
 * Fonction de configuration de l'écran LCD pour la barre de progression.
 * Utilise les caractéres personnalisés de 0 à 5 (6 et 7 restent disponibles).
 */

// You can have up to 10 menu items in the menuItems[] array below without having to change the base programming at all. Name them however you'd like. Beyond 10 items, you will have to add additional "cases" in the switch/case
// section of the operateMainMenu() function below. You will also have to add additional void functions (i.e. menuItem11, menuItem12, etc.) to the program.
String menuItems[] = { "LED On", "LED Off", "Output LED", "Input LED", "Happy Birthday", "Version", "Gangsta", "BE GONE" };

// Navigation button variables
int readKey;
int savedDistance = 0;

// Menu control variables
int menuPage = 0;
int maxMenuPages = round(((sizeof(menuItems) / sizeof(String)) / 1) + .5);
int cursorPosition = 0;

// Creates 3 custom characters for the menu display
byte downArrow[8] = {
  0b00100,  //   *
  0b00100,  //   *
  0b00100,  //   *
  0b00100,  //   *
  0b00100,  //   *
  0b10101,  // * * *
  0b01110,  //  ***
  0b00100   //   *
};

byte upArrow[8] = {
  0b00100,  //   *
  0b01110,  //  ***
  0b10101,  // * * *
  0b00100,  //   *
  0b00100,  //   *
  0b00100,  //   *
  0b00100,  //   *
  0b00100   //   *
};

byte menuCursor[8] = {
  B01000,  //  *
  B00100,  //   *
  B00010,  //    *
  B00001,  //     *
  B00010,  //    *
  B00100,  //   *
  B01000,  //  *
  B00000   //
};

#include <Wire.h>
#include <LiquidCrystal.h>

// Setting the LCD shields pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
  lcd.createChar(123, customChar);
  pinMode(LED1, OUTPUT);
  pinMode(LED, OUTPUT);
  // Initializes serial communication
  Serial.begin(9600);

  // Initializes and clears the LCD screen
  lcd.begin(16, 2);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Starting.");
  delay(1000);
  lcd.clear();
  lcd.print("Starting..");
  delay(1000);
  lcd.clear();
  lcd.print("Starting...");
  delay(1000);
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("C");
  delay(1000);
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("Cm");
  delay(1000);
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("Cmd");
  delay(1000);
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("CmdO");
  delay(1000);
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("CmdOS");
  delay(1000);
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("CmdOS!");
  delay(1000);
  lcd.setCursor(3, 1);
  delay(1000);
  lcd.print("LCD Port!!!");
  delay(1000);
  lcd.clear();
  lcd.print(";)");
  delay(1000);



  // N.B. Les deux espaces en fin de ligne permettent d'effacer les chiffres du pourcentage
  // précédent quand on passe d'une valeur à deux ou trois chiffres à une valeur à deux ou un chiffre.



  // Creates the byte for the 3 custom characters
  lcd.createChar(0, menuCursor);
  lcd.createChar(1, upArrow);
  lcd.createChar(2, downArrow);
}

void loop() {
  mainMenuDraw();
  drawCursor();
  operateMainMenu();
  static byte percent = 0;
}




// This function will generate the 2 menu items that can fit on the screen. They will change as you scroll through your menu. Up and down arrows will indicate your current menu position.
void mainMenuDraw() {
  Serial.print(menuPage);
  lcd.clear();
  lcd.setCursor(1, 0);
  lcd.print(menuItems[menuPage]);
  lcd.setCursor(1, 1);
  lcd.print(menuItems[menuPage + 1]);
  if (menuPage == 0) {
    lcd.setCursor(15, 1);
    lcd.write(byte(2));
  } else if (menuPage > 0 and menuPage < maxMenuPages) {
    lcd.setCursor(15, 1);
    lcd.write(byte(2));
    lcd.setCursor(15, 0);
    lcd.write(byte(1));
  } else if (menuPage == maxMenuPages) {
    lcd.setCursor(15, 0);
    lcd.write(byte(1));
  }
}

// When called, this function will erase the current cursor and redraw it based on the cursorPosition and menuPage variables.
void drawCursor() {
  for (int x = 0; x < 2; x++) {  // Erases current cursor
    lcd.setCursor(0, x);
    lcd.print(" ");
  }

  // The menu is set up to be progressive (menuPage 0 = Item 1 & Item 2, menuPage 1 = Item 2 & Item 3, menuPage 2 = Item 3 & Item 4), so
  // in order to determine where the cursor should be you need to see if you are at an odd or even menu page and an odd or even cursor position.
  if (menuPage % 2 == 0) {
    if (cursorPosition % 2 == 0) {  // If the menu page is even and the cursor position is even that means the cursor should be on line 1
      lcd.setCursor(0, 0);
      lcd.write(byte(0));
    }
    if (cursorPosition % 2 != 0) {  // If the menu page is even and the cursor position is odd that means the cursor should be on line 2
      lcd.setCursor(0, 1);
      lcd.write(byte(0));
    }
  }
  if (menuPage % 2 != 0) {
    if (cursorPosition % 2 == 0) {  // If the menu page is odd and the cursor position is even that means the cursor should be on line 2
      lcd.setCursor(0, 1);
      lcd.write(byte(0));
    }
    if (cursorPosition % 2 != 0) {  // If the menu page is odd and the cursor position is odd that means the cursor should be on line 1
      lcd.setCursor(0, 0);
      lcd.write(byte(0));
    }
  }
}


void operateMainMenu() {
  int activeButton = 0;
  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 0:  // When button returns as 0 there is no action taken
        break;
      case 1:  // This case will execute if the "forward" button is pressed
        button = 0;
        switch (cursorPosition) {  // The case that is selected here is dependent on which menu page you are on and where the cursor is.
          case 0:
            menuItem1();
            digitalWrite(LED, HIGH);
            digitalWrite(LED1, HIGH);
            break;
          case 1:
            menuItem2();
            digitalWrite(LED, LOW);
            digitalWrite(LED1, LOW);
            break;
          case 2:
            menuItem3();
            pinMode(LED, OUTPUT);
            pinMode(LED1, OUTPUT);
            break;
          case 3:
            menuItem4();
            pinMode(LED, INPUT);
            pinMode(LED1, INPUT);
            break;
          case 4:
            menuItem5();
            break;
          case 5:
            menuItem6();
            break;
          case 6:
            menuItem7();
            break;
          case 7:
            menuItem8();
            break;
          case 8:
            menuItem9();
            break;
          case 9:
            menuItem10();
            break;
        }
        activeButton = 1;
        mainMenuDraw();
        drawCursor();
        break;
      case 2:
        button = 0;
        if (menuPage == 0) {
          cursorPosition = cursorPosition - 1;
          cursorPosition = constrain(cursorPosition, 0, ((sizeof(menuItems) / sizeof(String)) - 1));
        }
        if (menuPage % 2 == 0 and cursorPosition % 2 == 0) {
          menuPage = menuPage - 1;
          menuPage = constrain(menuPage, 0, maxMenuPages);
        }

        if (menuPage % 2 != 0 and cursorPosition % 2 != 0) {
          menuPage = menuPage - 1;
          menuPage = constrain(menuPage, 0, maxMenuPages);
        }

        cursorPosition = cursorPosition - 1;
        cursorPosition = constrain(cursorPosition, 0, ((sizeof(menuItems) / sizeof(String)) - 1));

        mainMenuDraw();
        drawCursor();
        activeButton = 1;
        break;
      case 3:
        button = 0;
        if (menuPage % 2 == 0 and cursorPosition % 2 != 0) {
          menuPage = menuPage + 1;
          menuPage = constrain(menuPage, 0, maxMenuPages);
        }

        if (menuPage % 2 != 0 and cursorPosition % 2 == 0) {
          menuPage = menuPage + 1;
          menuPage = constrain(menuPage, 0, maxMenuPages);
        }

        cursorPosition = cursorPosition + 1;
        cursorPosition = constrain(cursorPosition, 0, ((sizeof(menuItems) / sizeof(String)) - 1));
        mainMenuDraw();
        drawCursor();
        activeButton = 1;
        break;
    }
  }
}

// This function is called whenever a button press is evaluated. The LCD shield works by observing a voltage drop across the buttons all hooked up to A0.
int evaluateButton(int x) {
  int result = 0;
  if (x < 50) {
    result = 1;  // right
  } else if (x < 195) {
    result = 2;  // up
  } else if (x < 380) {
    result = 3;  // down
  } else if (x < 790) {
    result = 4;  // left
  }
  return result;
}

// If there are common usage instructions on more than 1 of your menu items you can call this function from the sub
// menus to make things a little more simplified. If you don't have common instructions or verbage on multiple menus
// I would just delete this void. You must also delete the drawInstructions()function calls from your sub menu functions.
void drawInstructions() {
  lcd.setCursor(0, 1);  // Set cursor to the bottom line
  lcd.print("Use ");
  lcd.write(byte(1));  // Up arrow
  lcd.print("/");
  lcd.write(byte(2));  // Down arrow
  lcd.print(" buttons");
}

void menuItem1() {  // Function executes when you select the 2nd item from main menu
  int activeButton = 0;

  lcd.clear();
  lcd.setCursor(3, 0);
  lcd.print("LED ON");

  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem2() {  // Function executes when you select the 2nd item from main menu
  int activeButton = 0;

  lcd.clear();
  lcd.setCursor(3, 0);
  lcd.print("LED OFF");

  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem3() {  // Function executes when you select the 3rd item from main menu
  int activeButton = 0;

  lcd.clear();
  lcd.setCursor(3, 0);
  lcd.print("Output Set");


  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem4() {  // Function executes when you select the 4th item from main menu
  int activeButton = 0;

  lcd.clear();
  lcd.setCursor(3, 0);
  lcd.print("Input Set");

  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem5() {  // Function executes when you select the 5th item from main menu
  int activeButton = 0;
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Warning: This");
  lcd.setCursor(0, 1);
  lcd.print("requires BUZZER.");
  delay(2000);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Please Connect");
  lcd.setCursor(0, 1);
  lcd.print("before using.");
  delay(2000);
  pinMode(buzzerPin, OUTPUT);
  tone(buzzerPin, c, 150 * 2);
  delay(200 * 2);
  tone(buzzerPin, c, 50 * 2);
  delay(buzzerPin * 2);
  tone(buzzerPin, d, kwart);
  delay(kwart);
  tone(buzzerPin, c, kwart);
  delay(kwart);
  tone(buzzerPin, f, kwart);
  delay(kwart);
  tone(buzzerPin, e, half);
  delay(half);
  tone(buzzerPin, c, 150 * 2);
  delay(200 * 2);
  tone(buzzerPin, c, 50 * 2);
  delay(50 * 2);
  tone(buzzerPin, d, kwart);
  delay(kwart);
  tone(buzzerPin, c, kwart);
  delay(kwart);
  tone(buzzerPin, g, kwart);
  delay(kwart);
  tone(buzzerPin, f, half);
  delay(half);
  tone(buzzerPin, c, 150 * 2);
  delay(200 * 2);
  tone(buzzerPin, c, 50 * 2);
  delay(50 * 2);
  tone(buzzerPin, hogeC, kwart);
  delay(kwart);
  tone(buzzerPin, a, kwart);
  delay(kwart);
  tone(buzzerPin, f, kwart);
  delay(kwart);
  tone(buzzerPin, e, kwart);
  delay(kwart);
  tone(buzzerPin, d, half);
  delay(half);
  tone(buzzerPin, Bb, 150 * 2);
  delay(200 * 2);
  tone(buzzerPin, Bb, 50 * 2);
  delay(50 * 2);
  tone(buzzerPin, a, kwart);
  delay(kwart);
  tone(buzzerPin, f, kwart);
  delay(kwart);
  tone(buzzerPin, g, kwart);
  delay(kwart);
  tone(buzzerPin, f, half);
  delay(half);

  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem6() {  // Function executes when you select the 6th item from main menu
  int activeButton = 0;

  lcd.clear();
  lcd.print("a0.1.75");
  lcd.setCursor(0, 1);
  lcd.print("CmdOS Alpha");


  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem7() {  // Function executes when you select the 7th item from main menu
  int activeButton = 0;
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("I don't think");
  lcd.setCursor(0, 1);
  lcd.print("your're funny");
  delay(3000);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("When you're");
  lcd.setCursor(0, 1);
  lcd.print("messin' with my");
  delay(3000);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("money");
  lcd.setCursor(0, 1);
  lcd.print("YEAH!");


  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem8() {  // Function executes when you select the 8th item from main menu
  int activeButton = 0;


  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("YOU CANT STOP ME");
  delay(2000);
  lcd.clear();
  lcd.setCursor(0, 1);
  lcd.print("HAHAHAHAHA");
  delay(2000);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("NOW BE DEAF!!!");
  tone(22, 10, 3000);

  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

void menuItem9() {  // Function executes when you select the 9th item from main menu
  int activeButton = 0;

  //Interface the DHT11 Temp & Humidity sensor and display humidity and  temperature
  //in Celsius, Fahrenheit, and Kelvin on a 20x4 character LCD



  //variable declarations



  int readDHT = DHT.read11(53);  //grab the 40-bit data packet from DHT sensor

  tempF = DHT.temperature * 9 / 5 + 32;  //convert temp to Fahrenheit



  lcd.setCursor(0, 0);
  lcd.print("Temp: ");
  lcd.print(tempF);  //display temp in F on LCD
  lcd.print("F");


  lcd.setCursor(0, 1);
  lcd.print("Humidity: ");
  lcd.print(DHT.humidity);
  lcd.print("%");
  lcd.setCursor(0, 0);
  delay(2000);
}


while (activeButton == 0) {
  int button;
  readKey = analogRead(0);
  if (readKey < 790) {
    delay(100);
    readKey = analogRead(0);
  }
  button = evaluateButton(readKey);
  switch (button) {
    case 4:  // This case will execute if the "back" button is pressed
      button = 0;
      activeButton = 1;
      break;
  }
}
}

void menuItem10() {  // Function executes when you select the 10th item from main menu
  int activeButton = 0;

  lcd.clear();
  lcd.setCursor(3, 0);
  lcd.print("Sub Menu 10");

  while (activeButton == 0) {
    int button;
    readKey = analogRead(0);
    if (readKey < 790) {
      delay(100);
      readKey = analogRead(0);
    }
    button = evaluateButton(readKey);
    switch (button) {
      case 4:  // This case will execute if the "back" button is pressed
        button = 0;
        activeButton = 1;
        break;
    }
  }
}

pls help

What exactly does "it" say ?

Copy the full error message using the convenient button in the IDE and post it here in code tags

The problem is probably that you have the wrong DHT library installed

Then you might need to install a new DHT library.

Per Using a DHTxx Sensor with Arduino | DHT11, DHT22 and AM2302 Sensors | Adafruit Learning System it looks like you need a function call here:

The example shows:

A constructor for a class instance is a function with the same name as the class: DHT::DHT. The error message means that there is no constructor for a DHT that takes no arguments.

As shown in the example above, you probably need two.

The IDE may help in this situation. If you type DHT dht( with the open parenthesis, the IDE should immediately put the close parenthesis ) automatically, and you should get a hint box that tells you what types the parameters are. Regardless, if the cursor is ever between the open and close parentheses for a function call, typing Ctrl-Shift-Space should open the hint box, and tell you the types of each parameter. If there are multiple parameters, the hint will highlight the current parameter, based on where the cursor is, relative to any commas between the parentheses. Some functions are overloaded to take many different permutations of arguments. You can cycle through these with the Up and Down arrows. For example

String m()

you can initialize a String 17 different ways. This kind of code assistance feature is found in many IDEs and code editors.

That's not invoking the constructor to make an empty String named 'm'. It's actually a prototype for a function named 'm' that takes no arguments and returns a String.

Yes, that wasn't clear. If you invoke the code assistance at that point (actually any time), you can see the choices. Only one of which has a default value for all arguments

String(const char *cstr = "")

which is what you get with no parentheses at all

String m;

for DHTTYPE, do you put the number i have? like mines is 11. Just a question.

All what you talking about is aplicable to Arduino IDE 2.x only. Arduino IDE 1.x doesn't include inline help.

I already fixed it. so you dont have to reply anymore.

And what was a problem?

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