terrapinlogo
Member
I have hooked my cybot up to a 20x2 and am in the process of coding it with a light avoid program but I am having trouble with a certain line of code.
I want to compare two variables and if they are within 50 of each other then it should go forward. With the code above I get a syntax error. Looking in the manual I can't see any command that would do what I want. Does an one have any ideas?
While I'm on the subject of this code, you may as well tell me if I have my hardware interrupt code setup correctly.
Code:
if rval = lval-50 or rval = lval+50 then goforward
While I'm on the subject of this code, you may as well tell me if I have my hardware interrupt code setup correctly.
Attachments
-
2.1 KB Views: 2