diff options
Diffstat (limited to 'pi_temp_pid.py')
-rw-r--r-- | pi_temp_pid.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/pi_temp_pid.py b/pi_temp_pid.py index a20f8b0..24b0428 100644 --- a/pi_temp_pid.py +++ b/pi_temp_pid.py @@ -3,6 +3,18 @@ """ Module controling temperature with PID setting a MOSFET. + +############################################# +# Flow # +############################################# + +start logging, run sanity checks -> +turn on relay -> +enter a loop of given interval -> +check temperature -> +try to write temperature log -> +calculate MOSFET value with PID > +set calculated value on MOSFET """ __author__ = "Franek Ćazarewicz-Muradyan" @@ -10,18 +22,6 @@ __licence__ = "GPL" __version__ = "0.0.1" __status__ = "Proof of concept" -############################################# -# Flow # -############################################# - -# start logging, run sanity checks -> -# turn on relay -> -# enter a loop of given interval -> -# check temperature -> -# try to write temperature log -> -# calculate MOSFET value with PID > -# set calculated value on MOSFET - import os import sys @@ -29,6 +29,7 @@ import time import signal import logging import io +import getpass from pydantic import BaseSettings try: @@ -44,7 +45,7 @@ except ImportError as exception: ############################################# # User: -USERNAME = os.getlogin() +USERNAME = getpass.getuser() # Files: |