Update rules1.txt
This commit is contained in:
parent
66de6e4751
commit
9a7ded281c
74
rules1.txt
74
rules1.txt
@ -1,14 +1,60 @@
|
||||
on System#Boot do
|
||||
GPIO,2,0
|
||||
LoopTimerSet,1,10
|
||||
endon
|
||||
|
||||
on laag#State do
|
||||
LogEntry,'laag#State: %eventvalue1% result: %eventvalue2%'
|
||||
|
||||
if [laag#State]=1
|
||||
GPIO,2,0
|
||||
else
|
||||
GPIO,2,1
|
||||
endif
|
||||
endon
|
||||
on System#Boot Do
|
||||
OLEDCMD,clear
|
||||
OLED,1,1,"Pompsturing Dompelpomp"
|
||||
GPIO,10,1
|
||||
Monitor GPIO, 3
|
||||
Endon
|
||||
|
||||
On GPIO#3=0 Do
|
||||
OLED, 7,1, "0 %eventvalue1%"
|
||||
TaskValueSet,status,xauto,0
|
||||
Endon
|
||||
On GPIO#3=1 Do
|
||||
OLED, 7,1, "1 %eventvalue1%"
|
||||
TaskValueSet,status,xauto,1
|
||||
|
||||
Endon
|
||||
|
||||
on manual#State do
|
||||
If [manual#State] = 1
|
||||
NeoPixel,4,0,255,0
|
||||
GPIO,3,0
|
||||
oledcmd,on
|
||||
OLED,2,1,"pomp handmatig "
|
||||
timerSet, 1, 3
|
||||
Else //off
|
||||
NeoPixel,4,0,22,0
|
||||
GPIO,3,1
|
||||
oledcmd,on
|
||||
OLED,2,1,"pomp automatisch "
|
||||
Endif
|
||||
Endon
|
||||
|
||||
on bovenste#State do
|
||||
If [bovenste#State] = 1 and [onderste#State] = 1 And [status#xauto]=0
|
||||
NeoPixel,2,0,255,0
|
||||
GPIO,3,1
|
||||
oledcmd,on
|
||||
OLED,2,1,"pomp wordt aangezet "
|
||||
timerSet, 1, 3
|
||||
Endif
|
||||
Endon
|
||||
|
||||
on onderste#State do
|
||||
If [onderste#State] = 0
|
||||
NeoPixel, 2,20,20,20
|
||||
GPIO,3,0 //pomp uit
|
||||
oledcmd,on
|
||||
OLED,2,1,"pomp uitgeschakeld "
|
||||
Endif
|
||||
Endon
|
||||
|
||||
On Rules#Timer=1 do
|
||||
If [onderste#State] = 1
|
||||
OLEDCMD,clear
|
||||
OLED, 2, 1, "pomp werkt niet!"
|
||||
tone,10,1300,200
|
||||
TimerSet, 1, 2
|
||||
Endif
|
||||
Endon
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user