i tried looking through the internet and i continue to find no anwsers for my problem was hoping a site like this could help me fix code to run
#include <LiquidCrystal.h>
#include "DHT.h"
#define DHTPIN 10 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
int TempPin = 10; // connecting temppin
int TempMin = 20; // minimum temperature to turn on fan at 0% fan speed
int Fan = 13; // fan outout drive for the fan
int Temp;
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal LCD(12,11,5,4,3,2);
void setup() {
LCD.begin(16,2);
// LCD.println("DHTxx test!");
dht.begin();
pinMode(Fan, OUTPUT);
pinMode(TempPin, INPUT);
}
void loop() {
// Wait a few seconds between measurements.
delay(2000);
// Read temperature as Celsius
float t = dht.readTemperature();
float h = dht.readHumidity();
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t) ) {
LCD.println("Failed to read from DHT sensor!");
return;
}
// Compute heat index
// Must send in temp in Fahrenheit!
//float hi = dht.computeHeatIndex(f, h);
LCD.print("Temp: ");
LCD.print(t);
LCD.print(" *C ");
//LCD.print(f);
//LCD.print(" *F\t");
//LCD.print("Heat index: ");
//LCD.print(hi);
delay(5000);
LCD.clear();
}
Temp = dht.readTemperature();
if(Temp < TempMin) { // if temp is lower than minimum temperature
Fan = LOW; // fan is off
}
else if((Temp >= TempMin) { // if temperature is higher than minimum temperature
Fan = HIGH; // fan is on
if you have any ideas it would be appreciated and helpful