paar Fragen zu SHT75 Sensor und Einbindung im Python

  • habe mir erst kürzlich einen SHT75 von Sensirion gekauft und will den heute Abend in meinem Python Programm einbinden.
    dazu habe ich paar kleine Fragen:

    Hier mal die Quelle zu dem Modul: https://pypi.python.org/pypi/sht-sensor/15.01.5

    Frage 1: Kann ich den Import nur einmal am Anfang meines Programms machen oder muss ich den in meine Schleife die die Werte Abfragt mit einbinden?
    (denke einmal sollte reichen)

    Python
    from sht_sensor import Sht
    sht = Sht(21, 17)
    print 'Temperature', sht.read_t()
    print 'Relative Humidity', sht.read_rh()

    Frage 2: Sind damit die GPIO gemeint ? also BCM Mode? oder Board.mode ?

    Zitat

    [font="Arial, Verdana, Geneva, Bitstream Vera Sans, Helvetica, sans-serif"]Module can be imported from the python code or used via included command-line tool, which should be installed along with the module (or can be used via ./sht symlink in the repo root without installation). See “Installation” section below on how to install the module.[/font]
    [font="Arial, Verdana, Geneva, Bitstream Vera Sans, Helvetica, sans-serif"]GPIO pin numbers (to which SCK and DATA sensor pins are connected) must be specified either on command-line (for cli tool) or on class init (when using as a python module).[/font]
    [font="Arial, Verdana, Geneva, Bitstream Vera Sans, Helvetica, sans-serif"]Example, for SCK pin 21 and DATA pin 17:[/font]

    Sorry dass ich erst Frage ohne selber zu probieren, werde heute Abend kein Internet zum Fragen haben...

  • paar Fragen zu SHT75 Sensor und Einbindung im Python? Schau mal ob du hier fündig wirst!

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!