Trigers if till


#1

with triggers I when one thing is triggered it does something till something else is trigered


#2

this can achieved by programming your device. what are you trying to do?


#3

I am making pool controls and I want when the low level water float is off it turns on value till high is on


#4

i dint get you. what sensors are you using?


#5

its just a switch


#6

its called a float sensor when theres water or no water its on or off


#7

so all I need is to when switch is off it turns relay on till second switch is active


#8

you have float sensor . when it is OFF you want to turn on relay till it becomes ON?. Do you have any link on how to connect it with arduino?


#9

no I’m using raspberry pi all it is a button so think of it as when button is pressed its on but I want it to trigger something to when its off it opens a value with a relay and keeps open till second switch is triggered


#10

all it does is when water lvl is to a lvl it is on


#11

i would suggest using a arduino in case of raspberry pi for your case as it give more control.
you have 2 button ( float sensor)

if (button1 == HIGH && button2 == LOW)
{
//turn on relay
} 
else
{
//turn off the relay
}

#12

well that’s no help but thanks any way theres a reason I use raspberry pi


#13

can i know the reason you are using Pi so i can suggest someway to get what you are trying.