Need a little help.
wiresalot
Posts: 40
My progam is as follows,
DO
dEBUG ? IN 2
DEBUG ? IN 3
DEBUG ? IN 4
IF (IN 4=0) THEN
LOW 14
ELSEIF (IN 3=1) THEN
HIGH 14
ELSE
PUASE 10
ENDIF
LOOP
How do I add another input? I read the docs,
Thanks
wiresalot
DO
dEBUG ? IN 2
DEBUG ? IN 3
DEBUG ? IN 4
IF (IN 4=0) THEN
LOW 14
ELSEIF (IN 3=1) THEN
HIGH 14
ELSE
PUASE 10
ENDIF
LOOP
How do I add another input? I read the docs,
Thanks
wiresalot
Comments
2) What do you mean by "add another input"? What do you want the input to do?
like :
if pin 4 low then low 14 loop
if pin 4 is high and pin 3 is high then high 14 loop
if pin 4 is high and pin 3 is low then pause 10 loop
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
The additional input would make 14 low and 15 high.
Script for Franklin;
if pin 4 is low then low 14 low 15 loop
if pin 3 is high then high 14 low 15 loop
if pin 2 is high then low 14 high 15 loop
Thanks for your replies.
wiresalot
The question is: Is this what you really want?
What about the relationship between the different switches? What do you want to do if the switches have the opposite setting? Do you want to react to the on-off or off-on transition rather than the switch state?
Thats how i want it to work (for now). So I dont need the ELSEIF and ELSE comands I see.
I am used to ladder logic/diagrams and wiring them trying to learn how to convert the diagrams
into code, This program runs like a stop forward reverse motor control circuit.
I still need to do alot more reading and learning with the Stamp! But I love to learn!
Thanks again!
wiresalot