运行效果:
参照:
http://shumeipai.nxez.com/2014/10/10/raspberry-dht11-get-temperature-data.html
1 | # -*- coding:utf8 -*- |
注意点:
- 连续采样不能间隔太短,我是500ms
- 判断采样是0,还是1是通过循环次数,所以这个需要自己调整
- 判断1的最大循环次数不能太多,太多会导致在跳不出循环。
树莓派连接方法:
运行效果:
参照:
http://shumeipai.nxez.com/2014/10/10/raspberry-dht11-get-temperature-data.html
1 | # -*- coding:utf8 -*- |
注意点:
树莓派连接方法: