-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTempControl Greenhouse.s
50 lines (40 loc) · 1.11 KB
/
TempControl Greenhouse.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#TempControl for Greenhouse air supply
#Incomplete, need to pull the finished script from in game. Pressure check is incomplete
define TempSensor HASH("StructureGasSensor")
define WallHeater HASH("StructureWallHeater")
define TempDisplay HASH("StructureConsoleLED5")
define WallVent HASH("StructureActiveVent")
alias GHTemp r15
alias CoolerPipePress r14
sb WallVent Lock 1
sb WallHeater Lock 1
sbn WallVent HASH("Cooler-Vent-Out") Mode 1
sbn WallVent HASH("Cooler-Vent-In") Mode 0
start:
sleep 5
lbn GHTemp TempSensor HASH("Sensor-GH-Temp") Temperature Maximum
sub r15 r15 273.15
s db Setting r15
blt GHTemp 20 HeaterOn
bgt GHTemp 22 HeaterOff
bgt GHTemp 25 CoolerOn
blt GHTemp 23 CoolerOff
j start
HeaterOn:
sbn WallHeater HASH("Heater-GH") On 1
j start
HeaterOff:
sbn WallHeater HASH("Heater-GH") On 0
j start
CoolerOn:
sbn WallVent HASH("Cooler-Vent-In") On 1
sleep 0.5
sbn WallVent HASH("Cooler-Vent-Out") On 1
j start
CoolerOff:
sbn WallVent HASH("Cooler-Vent-Out") On 0
sleep 5
sbn WallVent HASH("Cooler-Vent-In") On 0g
j start
PressureCheck:
lbn CoolerPipePress WallVent HASH("Cooler-Vent-In") PressureInternal Maximum