def lies_temp(host, port, uid): temp = None try: ipcon = IPConnection() b = BrickletBarometer(uid, ipcon) ipcon.connect(host, port) temp = b.get_chip_temperature() / 100.0 ipcon.disconnect() except: print("Temperaturabfrage fehlgeschlagen") return temp
def lies_temp(host, port, uid): temp = None try: ipcon = IPConnection() b = BrickletBarometer(uid, ipcon) ipcon.connect(host, port) temp = b.get_chip_temperature() / 100.0 ipcon.disconnect() except: print("Temperaturabfrage fehlgeschlagen") return temp
def lies_temp(host, port, uid): temp = None try: ipcon = IPConnection() b = BrickletBarometer(uid, ipcon) ipcon.connect(host, port) tt = 0.0 for i in range(10): tt = tt + b.get_chip_temperature() ipcon.disconnect() except: print("Temperaturabfrage fehlgeschlagen") temp = tt / 1000.0 return temp