reading data
Hi,
I have some sensors cicuit using bs2. Lets say I have a ultrasonic sensor circuit programmed by a bs2 to trigger a relay when a certain readings were read. I want to pull out a wire from·the relay to connect to another bs2 so that the 2nd bs2 can read the relay's state (whether it's triggered or not. eg. 5V or 0V). But I·don't know what to do in·the coding part and·I was wondering if the bs2 is about to do that? I need help. I have attached·a drawing and I hope it helps me to explain clearer.
Thank You
I have some sensors cicuit using bs2. Lets say I have a ultrasonic sensor circuit programmed by a bs2 to trigger a relay when a certain readings were read. I want to pull out a wire from·the relay to connect to another bs2 so that the 2nd bs2 can read the relay's state (whether it's triggered or not. eg. 5V or 0V). But I·don't know what to do in·the coding part and·I was wondering if the bs2 is about to do that? I need help. I have attached·a drawing and I hope it helps me to explain clearer.
Thank You
Comments
Just note that the Stamp probably cannot drive the relay directly unless its a very low current model.
In your program you'll have a statement something like: (see the Editor's helpfile for IF)
IF IN3 = 1 THEN
do something
ENDIF
do the other thing
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
If you connect the output of the relay to the Stamp and the fixed contacts are connected to 0V and +5V as you showed, you still need the 220 Ohm resistor for the same reason. What happens if there's an error programming the 2nd Stamp?