Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A4 dht22 problem
#6
we have tested , no problem with hardware. i think you can check your source code. 
here is our test code work with DHT11 sensor.
Code:
// REQUIRES the following Arduino libraries:
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
#include <DHT.h>
#define output1 4
#define input1   36
DHT dht13(13, 11);

void setup() {

  Serial.begin(9600);
  dht13.begin();

pinMode(output1,OUTPUT);
pinMode(input1,INPUT);
}


void loop() {
Serial.println(dht13.readTemperature());
delay(1000);
if (digitalRead(input1)==0 && digitalRead(output1)==0){digitalWrite(output1,1);
//delay(100);
}
else if(digitalRead(input1)==1 && digitalRead(output1)==1){digitalWrite(output1,0);
//delay(100);


}// end loop()
}
   
   
   
Reply


Messages In This Thread
KC868-A4 dht22 problem - by Joseph.o - 03-13-2023, 11:19 PM
RE: KC868-A4 dht22 problem - by admin - 03-14-2023, 12:08 AM
RE: KC868-A4 dht22 problem - by Joseph.o - 03-14-2023, 07:37 PM
RE: KC868-A4 dht22 problem - by admin - 03-14-2023, 11:12 PM
RE: KC868-A4 dht22 problem - by Joseph.o - 03-15-2023, 01:53 AM
RE: KC868-A4 dht22 problem - by admin - 03-15-2023, 01:55 AM
RE: KC868-A4 dht22 problem - by Joseph.o - 03-15-2023, 02:05 AM
RE: KC868-A4 dht22 problem - by Joseph.o - 03-15-2023, 03:14 AM
RE: KC868-A4 dht22 problem - by kovalank - 03-15-2023, 03:25 AM
RE: KC868-A4 dht22 problem - by admin - 03-15-2023, 04:45 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)