danjperron / PicoDHT22

Micropython DHT22 class using PIO
MIT License
49 stars 12 forks source link

Power pin #4

Closed 1602 closed 2 years ago

1602 commented 2 years ago

Could you please clarify usage of power pin? I see in the example it is set to 14, but I only have data pin connected to GP15 and nothing for GP14. I'm following this scheme: image (image credit: https://www.tomshardware.com/how-to/raspberry-pi-pico-weather-station)

danjperron commented 2 years ago

Hi Anatoiiy,

The power pin is not needed. Essentially is to reduce power and reset the DHT22. Sometimes my DHT22 hangs and it was the only way to reset it.

Instead of using the VCC to power up the DHT22 use on of the GPIO . Don't forget to put the pull up on the same GPIO you are using for power. Best regards,

Daniel Perron

Le 17 juill. 2021 à 11:46, Anatoliy @.***> a écrit :

Could you please clarify usage of power pin? I see in the example it is set to 14, but I only have data pin connected to GP15 and nothing for GP14. I'm following this scheme: https://user-images.githubusercontent.com/184172/126042407-8885049b-f452-443e-8c1e-39703db9a64d.png (image credit: https://www.tomshardware.com/how-to/raspberry-pi-pico-weather-station https://www.tomshardware.com/how-to/raspberry-pi-pico-weather-station)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/danjperron/PicoDHT22/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBF7XAVWQJM6U7UE55LBPLTYGQXDANCNFSM5ARF4JVQ.

1602 commented 2 years ago

Thank you, Daniel! I tried to use GPIO 14 as a power source for the sensor and it works as expected. Additionally thank you so very much for sharing your code, not only it helps to progress with my first project on raspberry pi pico, but also helps to learn how to deal with PIO.