Line Follow Logic Problem


#1

Mblock 5 on an Mbot
Situation:- Left side of line sensor is white and the right side of the line sensor is black.
Why would
(line follower sensor PORT2 detects LEFT being BLACK) AND (line follower sensor PORT2 detects RIGHT being BLACK)
evaluate to TRUE.

Surely the fact that the Left is White would cause the first half of the AND statement to evaluate to FALSE wouldn’t it.
NB: It does work if the test is changed to BOTH being BLACK, but why doesn’t it work in the above statement?


#2

Please upgrade firmware for mBot, enable test and do test again. If there is issue still, please kindly post a clip to show the issue.
In my test, when program set left=white, right=black, then line sensor left light lit up, right light is off, it will show true; if program set left=black, right=black, but actually line sensor left light is lit up still, it will be false no matter what right light is. It is working as it should be.



#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.