Tag Archives: pi

Steuerung von Lüfter und Trockner im Keller

Nach einigen früheren Projekten auf Basis des Raspberry Pi Zero kommt hier nun ein viertes mit dem Temperatur und Luftfeuchte im Keller und der Aussenluft bestimmt wird. Es funktioniert auf Basis des häufig verwendeten SHTC3 Sensors.

 

 

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.


CC-BY-NC

Phantastic, the peer-review system is broken

A comment on the online Nature website says it all

Phantastic. Moreover, the peer-review system is broken with top PI’s getting away with publishing high impact poorly reviewed rubbish. If more non-peer-reviewed research becomes more prominent it will hardly make a difference to quality and can overall only be a good thing.

commenting on the recent decision at Harvard to automatically publish all papers by its Faculty of Arts and Sciences on the university’s website (except there is a waiver). I am waiting for the first German university to follow; effectively since January 2008 we get all our ordered documents on paper again for copyright reasons.


CC-BY-NC