Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Temperature Sensor Options
#17

(05-01-2024, 07:47)Palmyweather Wrote:  I have enabled the serial data output from the DHTxx library with the below results. I note that the serial data from the DHTxx library only displays once on the initial reading and not again.
 
Code:
DHT 14 3 4 4 4 4 3 12 4 4 12 4 12 4 12 4 4 4 3 4 3 4 4 4 4 12 12 12 3 4 4 12 4 4 4 12 12 12 3 4 4
HEX 15 2 54 0 E2 38 : 38
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 22.60  Hum: 59.60

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 226.00  Hum: 0.00

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 293.92  Hum: 0.00

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 317.76  Hum: 0.00

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: -99.20  Hum: 0.00

After board reset:
Code:
DHT 14 4 4 4 3 4 3 12 3 4 11 12 3 4 12 4 4 4 3 4 4 4 4 3 4 11 12 12 4 3 4 11 12 4 12 4 4 12 4 3 12
HEX 15 2 64 0 E3 49 : 49
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 22.70  Hum: 61.20

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 227.00  Hum: 0.00

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 303.92  Hum: 0.00

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: -237.60  Hum: 0.00

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 245.44  Hum: 0.00

So it looks like additional requests for data of the DHT sensor is not occurring.

The requests are happening, but the sensor doesn't reply within the time defined on the library, so the reading is aborted. I don't know why. Interistingly the wakeup timmings on the DHTxx libary are the same used by the other DHT library which works for you.



(05-01-2024, 07:47)Palmyweather Wrote:  As an idea, would you mind zipping up your working code with the DHT sensor you tested last week and supplying it with the library etc to see if I can get your code to work correctly on mine?

I did my tests with the original WeatherDuino TX software and the DHT22 sensor connected to the TX board. So you already have the code I used.

Maybe we should wait until you get the new batch of DHT22 sensors, but if you would like to continue doing more to discover this mistery, try this:

Search on the DHTxx.cpp file for the part of the code show bellow, them replace the value of "250" to "400" on the two places (lines 37 and 44). Save the changes, compile the code again and upload.
This just increases the time waiting for an answer.

Code:
for (timer = 0; timer < 250; ++timer)
        if (digitalRead(pin) != j)
          break;
#if DEBUG_DHT
    times[i] = timer;
#endif
    // if no transition was seen, return
    if (timer >= 250) {

Rgs.
Werk_AG

Reply


Messages In This Thread
Temperature Sensor Options - by Palmyweather - 10-12-2023, 03:27
RE: Temperature Sensor Options - by Shred - 11-12-2023, 10:43
RE: Temperature Sensor Options - by werk_ag - 17-12-2023, 00:48
RE: Temperature Sensor Options - by Palmyweather - 22-12-2023, 20:07
RE: Temperature Sensor Options - by werk_ag - 28-12-2023, 23:21
RE: Temperature Sensor Options - by Palmyweather - 29-12-2023, 08:43
RE: Temperature Sensor Options - by werk_ag - 30-12-2023, 04:54
RE: Temperature Sensor Options - by Palmyweather - 30-12-2023, 08:37
RE: Temperature Sensor Options - by werk_ag - 31-12-2023, 00:05
RE: Temperature Sensor Options - by Palmyweather - 31-12-2023, 06:11
RE: Temperature Sensor Options - by Palmyweather - 30-12-2023, 08:40
RE: Temperature Sensor Options - by Palmyweather - 31-12-2023, 06:26
RE: Temperature Sensor Options - by werk_ag - 04-01-2024, 06:13
RE: Temperature Sensor Options - by Palmyweather - 04-01-2024, 09:22
RE: Temperature Sensor Options - by werk_ag - 05-01-2024, 03:30
RE: Temperature Sensor Options - by Palmyweather - 05-01-2024, 07:47
RE: Temperature Sensor Options - by werk_ag - 08-01-2024, 19:43
RE: Temperature Sensor Options - by Palmyweather - 09-01-2024, 08:46
RE: Temperature Sensor Options - by Palmyweather - 15-01-2024, 00:15
RE: Temperature Sensor Options - by werk_ag - 15-01-2024, 01:54
RE: Temperature Sensor Options - by Franco - 14-04-2026, 03:18



Users browsing this thread: 1 Guest(s)