Add heater2 the same output as humidifier

This commit is contained in:
Nicolò Balzarotti 2023-02-25 11:04:44 +01:00
parent 256df00325
commit 012d731f03
3 changed files with 16 additions and 7 deletions

View File

@ -99,4 +99,6 @@ actuators = {
wattage=12*0.4),
'humidifier': PIN(pin=17, initial=GPIO.HIGH, onstate=GPIO.LOW, offstate=GPIO.HIGH,
wattage=25),
'heater2': PIN(pin=17, initial=GPIO.HIGH, onstate=GPIO.LOW, offstate=GPIO.HIGH,
wattage=2000),
}

View File

@ -94,15 +94,22 @@
"name": "Yogurt",
"description": "Lascia raffreddare lo yogurt per fare l'inoculo, mantiene a 42 gradi fino a che è pronto, e poi porta a 4 gradi.",
"controllers": [
"(make-duty-controller \"heater\" 0.20 120 '<)"
"(make-duty-controller \"heater2\" 0.10 120 '<)"
"(make-duty-controller \"freezer\" 0.20 120 '>)"
],
"phases": [
{
"name": "Prepare",
"description": "Turn Fan On",
"exit_condition": "#t",
"on_load": "(set-actuator \"fan\" #t)",
"on_exit": "#t"
},
{
"name": "Cool",
"description": "Cool to 46°C",
"exit_condition": "(and (< (get-sensor \"T_food\") 46.0)\n(> (get-sensor \"T_food\") 42.0))",
"on_load": "(begin (set-controller \"heater\" \"T_food\") (set-target \"T_food\" 46.0) (set-controller \"freezer\" \"T_ext\") (set-target \"T_ext\" 46.0))",
"on_load": "(begin (set-controller \"heater2\" \"T_food\") (set-target \"T_food\" 46.0) (set-controller \"freezer\" \"T_ext\") (set-target \"T_ext\" 46.0))",
"on_exit": "#t"
},
{
@ -114,15 +121,15 @@
},
{
"name": "Hold",
"description": "Keep at 42°C for 3h",
"exit_condition": "(> (time-in-this-phase) (hours 3))",
"description": "Keep at 42°C for 4h",
"exit_condition": "(> (time-in-this-phase) (hours 4))",
"on_load": "(begin (set-target \"T_food\" 41.0) (set-target \"T_ext\" 41.0))",
"on_exit": "(notify \"You can remove the yogurt from the heater\")"
"on_exit": "(notify \"The yougrt is ready\")"
},
{
"name": "Refrigerate",
"description": "Lower temperature to 4gradi",
"exit_condition": "#f",
"exit_condition": "(manual-intervention \"Rimuovi lo yogurt\" '((\"Fatto\" #t)))",
"on_load": "(begin (set-target \"T_food\" 4.0) (set-target \"T_ext\" 4.0))",
"on_exit": "(notify \"You can remove the yogurt from the heater\")"
}

View File

@ -182,7 +182,7 @@ class Sensors():
'T_ext': SHT40('Temperature'),
'H_ext': SHT40('Humidity'),
'heater': GPIOState(22),
'humidifier': GPIOState(17),
'humidifier/heater2': GPIOState(17),
'fan': GPIOState(27),
}