Hi,
It took me a while to figure out that the reason my DHT22 was returning nothing but 0 values, was that I was using Python3 to run the script.
With the sunsetting of Python 2.X in a little over 2 months, it might be good to port the library to Python 3.X or at the very least, put a disclaimer on the wiki to warn users not to use Python3.
Thanks!
Hi There
I was a success by using Python 3 to get data. Detailed steps are as follows:
- Install grove.py
</s><i> </i> git clone https://github.com/Seeed-Studio/grove.py cd grove.py sudo pip3 install. <e>
- install Seeed_Python_DHT and run demo
</s><i> </i> git clone https://github.com/Seeed-Studio/Seeed_Python_DHT.git cd Seeed_Python_DHT sudo python3 setup.py install cd ~/Seeed_Python_DHT/examples Change the sensor = seeed_dht.DHT("11", 12) to sensor = seeed_dht.DHT("22", 12) python3 dht_simpleread.py <e>
What port would I need to use with the GrovePi Plus HAT?
For GrovePi it says D12 and in the Python3 script it is also port12.