DHT11の温度、湿度データをのちのちグラフ化したい。
とりあえず1秒ごとに取得するため、whileとtime.sleep()を使う。
timer.py
# !/usr/bin/env python
import time
while True:
print "Hello"
time.sleep(1)
print "Hello"の部分にDHT11からの読取り処理を実装する。
cronでやってもよさそうだけど、pythonコードで対応。
Go to list of users who liked
More than 5 years have passed since last update.
DHT11の温度、湿度データをのちのちグラフ化したい。
とりあえず1秒ごとに取得するため、whileとtime.sleep()を使う。
# !/usr/bin/env python
import time
while True:
print "Hello"
time.sleep(1)
print "Hello"の部分にDHT11からの読取り処理を実装する。
cronでやってもよさそうだけど、pythonコードで対応。
Register as a new user and use Qiita more conveniently
Go to list of users who liked