thermostat/pythermostat/example.py
atse 6aef143e3e PyThermostat: Remove tec terminology
The client controls the Thermostat as a whole and not just a TEC
attached to it; adjust variable names accordingly.
2025-01-06 18:04:12 +08:00

14 lines
375 B
Python

import time
from pythermostat.client import Client
thermostat = Client() #(host="localhost", port=6667)
thermostat.set_param("b-p", 1, "t0", 20)
print(thermostat.get_output())
print(thermostat.get_pid())
print(thermostat.get_output())
print(thermostat.get_postfilter())
print(thermostat.get_b_parameter())
while True:
print(thermostat.get_report())
time.sleep(0.05)