Skip to content

Instantly share code, notes, and snippets.

View mcprat's full-sized avatar

Michael Pratt mcprat

  • Ohio
  • 04:28 (UTC -04:00)
View GitHub Profile
@mcprat
mcprat / program.py
Last active February 6, 2025 23:49
AquaCal TropiCal Heater Heat Pump Pimoroni Automation Hat main program (5V thermistor voltage divider, 85F water temp, 40F defrost)
#!/usr/bin/env python3
import time
import statistics
import automationhat
time.sleep(300)
def comp_on():
automationhat.relay.one.on()
@mcprat
mcprat / heater.service
Created February 6, 2025 23:46
Systemd unit for Python script execution (heat pump)
[Unit]
Description=TropiCal
[Service]
User=tropical
ExecStart=/home/tropical/.virtualenvs/pimoroni/bin/python3 /home/tropical/program
ExecStopPost=/home/tropical/.virtualenvs/pimoroni/bin/python3 /home/tropical/alloff
Type=exec
Restart=always