Hi
Almost certainly this will strike some here as a tedious newbie question - sorry...
I have a nicely working ESP8266 with Micropython - I got past all the teething troubles with poor power supplies, unreliable flashing sessions, general python learning curve etc..
But this has me stumped. I found the DHT class library for the ESP8266:
https://github.com/micropython/micropyt ... pts/dht.py
How do I use this in my script?
Suggestion: when you publish libraries for micropython, please include even a few lines as an "Idiot's guide to using this...'
I say that because micropython is but one of several ESP8266 possible environments, and as such is 'competing' with more mature / documented / supported things. It would be a shame to lose potential adopters for want of a few more simple signposts along the way...
But again, "thank you" to all those who are making micropython on the ESP a reality. It truly rocks! I really hope it is widely adopted for IoT applications...
DHT11 & 22 question
Re: DHT11 & 22 question
Result from short search in this forum:
Code: Select all
import dht
import machine, time
d = dht.DHT22(machine.Pin(4))
while True:
d.measure()
d.temperature(), d.humidity()
time.sleep(1)