Photon does not get the values from DHT22

Hello,

I have a Core and now a Photon as well. I have a working code on the Core for DHT22 to get the temp and hum data.

However, flash the same code and hook up the DHT22 to the Photon, I cannot get any data…

It is hooked up to D3, gnd and 3v3 pins.

Any idea? The code should work from Core on Photon as well as far as I know, right? or do I miss something ?

Many thanks in advance,
Algo

This code works on the Photon without any issues and it’s non-blocking :smile:

2 Likes

Thanks for the reply. I am using this code, which is perfectly fine on core, but not delivering values from photon

Are you sure its not this issue :

That's the reason my DHT22 is not reporting values right now.

Try printing the values over serial, and see if that works for you? If so, then there’s likely another issue, whereby the one pointed out by @Rockvole is the best contender.

This will be the issue, because i try to convert float to string and i get null. Thank you very much!!!

Sorry about the float to string conversion in sprintf not working. Please see this thread for whent he fix is available and a workaround.