guten morgen,
kennt jemand die initial routine von einem DHT20 ?
Im Datenblatt (
http://aosong.com/userfiles/files/media/Data%20Sheet%20DHT20%20%20A1.pdf
) steht,
1 | 7.4 Sensor Reading Process
|
2 | 1.After power-on, wait no less than 100ms. Before reading the temperature and humidity value, get a byte of status
|
3 | word by sending 0x71. If the status word and 0x18 are not equal to 0x18, initialize the 0x1B, 0x1C, 0x1E registers,
|
4 | details Please refer to our official website routine for the initialization process; if they are equal, proceed to the next
|
5 | step.
|
mit einem kleinen Pythonscript auf dem RPI wollte ich das teil in
betrieb nehemen und testen, bevor ich es an einem Mikrocontroller
anschliße.
1 | import time
|
2 | import smbus
|
3 |
|
4 | address = 0x38
|
5 |
|
6 | i2cbus = smbus.SMBus(1)
|
7 | time.sleep(0.5)
|
8 |
|
9 | data = i2cbus.read_i2c_block_data(address,0x71,1)
|
10 | print('data: ', data[0])
|
data[0] ist gleich 28,
also 0x1C, also ungleich 0x18
wie muss ich denn die Register 0x1B, 0x1C, 0x1E jetzt initialisiren?
es steht, dass man auf der webseite für die initialisierungsprozess was
findet. Aber dort habe ich nichts gefunden. gehört so etwas nicht aber
auch ins Datenblatt (egal ob von china oder nicht)?