Da die physikalische I2C Adresse des SHTC3 nicht geändert werden kann, brauchen wir zusätzlich ein Mux Board, das mit einer Lötbrücke auf dem ADR0 Jumper die Adresse von 0x70 auf 0x71 ändert.
#!/usr/bin/env python3
import csv
import board
import busio
import adafruit_shtc3
from adafruit_tca9548a import TCA9548A
def main():
# Initialize the iic bus
i2c = busio.I2C(board.SCL, board.SDA)
# Initialize the TCA9548A multiplexer
mux = TCA9548A(i2c, address=0x71)
# Initialize the SHTC3 sensor on MUX channel 0
shtc3_channel_0 = adafruit_shtc3.SHTC3(mux[0])
# Initialize the SHTC3 sensor on MUX channel 1
shtc3_channel_1 = adafruit_shtc3.SHTC3(mux[1])
with open("/home/admin/www/taupunkt.log","a+") as out_file:
tsv_writer = csv.writer(out_file, delimiter='\t')
temperature0, relative_humidity0 = read_shtc3(shtc3_channel_0)
temperature1, relative_humidity1 = read_shtc3(shtc3_channel_1)
dt = time.strftime('%Y-%m-%d %H:%M:%S')
tsv_writer.writerow([dt,
temperature0,relative_humidity0,
temperature1,relative_humidity1])
if __name__ == '__main__':
main()
Damit kann nun nach Bedarf ein Lüfter angesteuert werden, mit unter 40€ Bauteilen statt mit 570€ Fertiglösung. Als smarte Steckdosen gibt es zB die Edimax Smartplug SP1101W auf der ein Webserver läuft der curl Befehle annimmt.
Time course of earth temperature (1850-2018) and CO2 (1850-2011)
while the correlation is higher than I expected
Correlation of earth temperature and CO2
References
1850-1957: D.M. Etheridge, L.P. Steele, R.L. Langenfelds, R.J. Francey, J.-M. Barnola and V.I. Morgan, 1996, J. Geophys. Res., 101, 4115-4128,”Natural and anthroupogenic changes in atmospheric CO2 over the last 1000 years from air in Antarctic ice and firn”.
1958-1974: Means of Scripps Institution of Oceanography Continuous Data at Mauna Loa and South Pole provided by KenMaarie (personal communication)
1975-1982: Means of NOAA/CMDL in-situ data at Mauna Loa and South Pole. (P. Tans and K.W. Thoning, ftp://ftp.cmdl.noaa.gov/ccg/co2/in-situ)
1983-2003: Global means constructed using about 70 CMDL CCGG Sampling Network station data. (P.P. Tans and T.J. Conway, ftp://ftp.cmdl.noaa.gov/ccg/co2/flask)
2004-2007: Global mean growth rates. (T. Conway, ftp://ftp.cmdl.noaa.gov/ccg/co2/trends)