http://yehnan.blogspot.tw/2015/05/raspberry-pidht11.html
先安裝所需套件:
sudo apt-get update
sudo apt-get install build-essential python-dev git-core
下載程式,進入該目錄,然後安裝:
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd Adafruit_Python_DHT
sudo python setup.py install
讀取DHT11的溫溼度資訊
cd examples
sudo ./AdafruitDHT.py 11 4
沒有留言:
張貼留言