Conditional statements and QTI's
gbd28
Posts: 2
I'm working with the line follow code that is supplied with the QTI sensor kit. It works great but I have two situations where the sensors read
CASE %1110
and I need to distinguish between them so that I can run different subroutines at different times. I have tried using "IF THEN" statements but I am not
getting the desired results. Is there some way to make the "case" both a condition and a variable? I am new to pbasic and would appreciate any help that is offered.
CASE %1110
and I need to distinguish between them so that I can run different subroutines at different times. I have tried using "IF THEN" statements but I am not
getting the desired results. Is there some way to make the "case" both a condition and a variable? I am new to pbasic and would appreciate any help that is offered.
Comments
What are the two conditions that causes the sensors to read %1110, and what makes them different? If you attach the code that you have, it can help us get a better understanding of what you want to do.
One solution would be to have the CASE %1110 go to a subroutine with IF...THEN statements to make another decision based on other parameters. But also keep in mind that you can only nest 4 subroutines before the program will get lost.
Hope this helps.
-- Jessica
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Education Department
Parallax Inc.
I have been successful at programing both of these individual series of operations with sub routines but have not found a way to have both perform.
The code is
I hope this more clearly defines my difficulty. Thanks you again for any and all help
I know this is the condensed version, but if you need more detail and nobody else chimes in before I return from my trip today, I can talk more then.
Gotta run,
Ron aka sailman58