Page 1 of 1

Help needed blocklyscript doorsensor toilet

Posted: Thursday 04 April 2019 9:12
by yazoo
i have a door sensor
what i want is is the door is open light goos on. but then when the door is kloos and goos open witin 7 minutes from het first time the door is open it me not sent that the light goos on

what i have now is

if-->sensor1=Alarm
do set-->WC lamp=on

who can help me finist this script if it dont can with blockly then with an another script.

Re: Help needed blocklyscript doorsensor toilet

Posted: Thursday 04 April 2019 11:13
by Gerwin
more info is more than welcome
wich sensor are you using only open state or open and close
picture of your blockly

gerwin

Re: Help needed blocklyscript doorsensor toilet

Posted: Thursday 04 April 2019 11:47
by yazoo
Gerwin wrote: Thursday 04 April 2019 11:13 more info is more than welcome
wich sensor are you using only open state or open and close
picture of your blockly

gerwin
this a simpel door magneet kerui state normal/alarm (same as open and close)
the script what if have works only it isnt finnist en that i dont no how to do.

if-->sensor1=Alarm
do set-->WC lamp=on
sensor1.png
sensor1.png (6.38 KiB) Viewed 1045 times

Re: Help needed blocklyscript doorsensor toilet

Posted: Thursday 04 April 2019 12:08
by kuifje
Yazoo,

You have to use a user variable.
When sensor1 is alarm and sensor1 is 0
Set sensor1 to 1
Set wclamp to on
If sensor1 is no alarm and sensor1 is 1
Set wclamp off

Use the if else blockly. The one with the blue shizzle.
Mabey this will get you in the right direction

Kuifje

Re: Help needed blocklyscript doorsensor toilet

Posted: Thursday 04 April 2019 12:12
by Gerwin
Make a dummy switch and make them a timer and set the time you want that the light must go out
And use the block and
Like : if sensor 1 =alarm and timer is off
Set timer on
Set wc lamp on

Re: Help needed blocklyscript doorsensor toilet

Posted: Friday 05 April 2019 9:07
by yazoo
kuifje wrote: Thursday 04 April 2019 12:08 Yazoo,

You have to use a user variable.
When sensor1 is alarm and sensor1 is 0
Set sensor1 to 1
Set wclamp to on
If sensor1 is no alarm and sensor1 is 1
Set wclamp off

Use the if else blockly. The one with the blue shizzle.
Mabey this will get you in the right direction

Kuifje
hello kuifje can you please help me i try to make what you are writen ,but i am a biginner i do somting not goed. this is wat i have.
test1.png
test1.png (42.18 KiB) Viewed 1017 times

Re: Help needed blocklyscript doorsensor toilet

Posted: Friday 05 April 2019 12:48
by kuifje
Yazoo,

you have to use 1 if do blockly en put the else under the if. ( example )
Knipsel.JPG
Knipsel.JPG (23.58 KiB) Viewed 1005 times
The user variable has to be integer. ( Example )
Knipsel1.JPG
Knipsel1.JPG (18.52 KiB) Viewed 1005 times

Kuifje