Webcore: Set a variable based on a sensor then act based on that variable

I’m looking to set up a piston that when activated looks at a Sensor. If the sensor is closed, it should set a variable of “Status=closed”. If the sensor is open it should set a variable of “Status=open”. Then:

if ( $Status = closed ) { turn on lightswitch - g-lights; activate momentary relay g-door)
else
if ( $Status = closed ) { turn off lightswitch - g-lights; activate momentary relay g-door)

There’ll be more later but thats where I need to start. Anyone have a simple example?

Robert

You might want to post this in the webCoRE forum.
All the webCoRE peeps are there.

1 Like