Using espeasy mega-20231130, I have added devices : Switch and relay and servo.
1) Device config is:
Switch input - Switch
Name -switch
Internal pullup - marked
Gpio 12
switch type: switch
Switch button type: Push button active low
debounce 50ms.
2)Device config is:
Switch input - switch
Name -Relay
Internal pullup - marked
Gpio 13
switch type: switch
Switch button type: normal switch
Rules looks like:
Code: Select all
On System#Boot do
Servo,1,2,0
GPIO,13,0
endon
On Switch#State Do
if [Switch#State]=1
Servo,1,2,180
gpio,13,1
else
Servo,1,2,0
GPIO,13,0
endif
EndOn
What do I don't understand? When system boot i want to have relay and switch 0