(bentiek stands for peapole inside the room )
Heres the data sheet: www.ekt2.com/pdf/412_CH_SMART_SHAFT_ENCODER_KIT.pdf
And the code also sets of a second relay that turns on a siren if someone has onli gone half way through or if another peolple started entering the room before the other one had gone through the second gate.
Sory but i for some reson cant upload a pictere of the wiraing.
May be describe how this code is supposed to work and what you are doing with the relays. Supply a picture of how it is wired up and explain your choice of B83609 sensors for counting people in a room.
Please post a link to the datasheet for the B83609.
Also tell us what your program actually does when you run it and what you want it to do that is different.
...R
PS ... To make it easy for people to help you please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum
Tanks DrDiettrich!
For the sugeston but is there a way to make the code so if someone there was a person in the room but left that the relay only turns of whena cearin time has pased