|
META TOPICPARENT |
name="CourseExercises" |
Measuring temperature and humidity
Goal: |
| Comments:
Of course it is also possible to treat the data on the fly during data taking (you may want to give it a try!) However in this case debugging is more difficult due to real time constraints. You cannot put print statements into the code for debugging because the DHT-11 will not wait until your debugging print has finished. If you separate data taking and data analysis, the debugging becomes much easier because you have plenty of time to look at the data. |
|
> > | Python |
| |
|
> > | For those of you who prefer Python, I have written a Python class to access the dht11 and a small example program creating an instance of this class and using it to take measurements and printing the result.
Since my programming experience in Python is very restricted (just 4 days!) please don't be too critical with my code. It seems to work though.
https://iotworkshop.africa/pub/Embedded_Systems/TemperatureHumidity/dht11Class.py.txt
https://iotworkshop.africa/pub/Embedded_Systems/TemperatureHumidity/dht11Example.py.txt |
|
-- Uli Raich - 2017-08-13 |
|
META FILEATTACHMENT |
attachment="dht11Data.png" attr="" comment="" date="1508947930" name="dht11Data.png" path="dht11Data.png" size="39644" user="uli" version="1" |
META FILEATTACHMENT |
attachment="dht11.odt" attr="" comment="" date="1508957658" name="dht11.odt" path="dht11.odt" size="60277" user="uli" version="1" |
META FILEATTACHMENT |
attachment="dht11.pdf" attr="" comment="" date="1511778913" name="dht11.pdf" path="dht11.pdf" size="95890" user="uli" version="1" |
|
|
> > |
META FILEATTACHMENT |
attachment="dht11Class.py.txt" attr="" comment="" date="1511953625" name="dht11Class.py.txt" path="dht11Class.py.txt" size="7684" user="uli" version="1" |
META FILEATTACHMENT |
attachment="dht11Example.py.txt" attr="" comment="" date="1511953625" name="dht11Example.py.txt" path="dht11Example.py.txt" size="735" user="uli" version="1" |
|