[SOLVED] DHT22 issue with Photon

Take a close look at this post, might help :wink:

I've tried 2 resistors: brown-black-orange (from Adafruit: 10k) & brown-black-red (1k). I also rewrote the example to make it more understandable (to me): But there's no way to sensibly include CPP text/

Here's the printout:

Press any key to start.
DHT Example program using DHT.acquire and DHT.aquiring
LIB version: 0.2

0: Retrieving information from sensor: .............. (dots represent 10ms delays for DHT.acquiring() in a loop)
Read sensor: Error

.ISR time out error

1: Retrieving information from sensor: ...............
Read sensor: Error

.ISR time out error

HI
Seems I have the same problems.
The code is using the #include ā€œPietteTech_DHT/PietteTech_DHT.hā€ lib, and is identical with the one above.
Tried:

  • different resistors
  • different DHT22
  • different Pins (D2, D5)
  • 3,3V and VIN

I always get the ISR timeout error. Any new ideas from you guys?

Thanks I appreciate your help.
Lukas

Hi guys - found the error.
It was my stupidity, new breadboard and I powered it wrongā€¦

Hi!

Iā€™m having issues as well. Hereā€™s my setup:

  • 10k resistor
  • Using the exact PietteTech code shown above, and #include ā€œPietteTech_DHT/PietteTech_DHT.hā€ library
  • Using pin D3
  • Code verifies and flashes successfully on web IDE

But I keep getting a ā€˜failedā€™ data error on the dashboard:

Many thanks!

This ā€œfailedā€ message should not bother you too much. Itā€™s not too uncommon to get a flash failed message while to code still got flashed fine.
You could always try to flash in Safe Mode too.

If you run the PietteTech code from post #1, this bit of code requires you to connect via serial and send a byte to the device in order to get the program running

    while (!Serial.available()) {
        Serial.println("Press any key to start.");
        delay (1000);
    }

You could always add a timeout too

  while (!Serial.available() && millis() < 30000) 
  { // wait for keypress or 30sec timeout
    Serial.println("Press any key to start.");
    delay (1000);
  }
1 Like

Thatā€™s already incuded in the code above, at the beggining of setup(). Inlcuding the timeout doesnā€™t make a difference. Any other ideas?

What exactly is the problem then?
Since you only mention the spark/flash/status failed issue, which I said is not really a problem since it is a false positive.

Have you tried checking the serial output? No data is supposed to show up in the dashboard, so youā€™ll be staring at that for a while if youā€™re waiting for thatā€¦

1 Like

Hence these earlier comments :wink:

1 Like

I guess I donā€™t know how to read data from and store it somewhere (numerous, etc.) to trigger other events. I assumed I couldnā€™t read data since the dashboard showed ā€˜failedā€™. Apologies if this is too basic. Thanks again!

1 Like

Is there anything we can help you with?

If you read the docs and still canā€™t wrap your head round it, we can help, but the basic functions listed in the docs should already mean something to you.

The PietteTech code uses two sensors A and B
I have two sensors and tried for the longest time to get a reading on a single sensor on port d2

So just for giggles I set up the other sensor on d3 and viola! I get readings on that port but not d2.
So does that mean d2 is bad? At $19 ... is this a warranty thing?

FYI... I flipped sensors and the issue did not follow the sensor ... it stayed with the port. So I know it's the Photon.

What to do? Is there a way to test the port?

@Walt750, interrupts on pin D2 are shared with pins A0 and A3 as per documentation. If you have interrupts set on those pins, that may be the issue.

Thanks Peekay123 ā€¦ I will check it out.
This is the only program that Iā€™m running though - Iā€™ll take a look ā€¦as far as Photonā€™s and Arduinoā€™s I love them.
Where was this stuff when I was kid?

1 Like