I read it for the time being, but I will manage the source with git. From Wai's repository to reference.
$ git clone https://github.com/kaepa3/Thermo_PI.git
The sauce looks like the sample.
input.py
import dhtreader
type = 11
pin = 4
dhtreader.init()
print dhtreader.read(type, pin)
If you look at the previous map, you can choose the location of the pin. I actually move it and do something about it. But at point 4, you'll know the answer.
So the problem. It doesn't work that way. However, it is recorded when the pull-up resistor is removed. As a result of the examination, the shape of the hardware is slightly different from that of the reference site. (No holes when viewed from above) On the back side, it is recorded as "strong sales". It's a lot of trouble, so I interpret it as a version that I bought without any resistance. Interpret ↓ very conveniently. http://www.myu.ac.jp/~xkozima/lab/raspTutorial3.html (I'm not sure how to do this, so I'll postpone this issue.)
Then, the temperature and humidity collection is completed. The source at the moment changes as follows.
import dhtreader
import os
import time
type = 11
pin =26
while True:
os.system("clear")
if 0 == dhtreader.init():
print("init error")
sensor_val = dhtreader.read(type, pin)
if sensor_val:
t,h = sensor_val
print("{0} {1}".format(t,h))
else:
print("error")
time.sleep(3)
I get quite an error. Did I not have to have such a hard time if I bought a proper sensor?
Once you get here, all you have to do is how to put it in the DB The Pyraz is over. Think after making an app on the rails side.
Just a personal computer.