Mbot programming to detect pattern X


#1

I need to code mbot robot for maze traveller. One of the requirement is the robot should touch one of the grid which is marked as X and then exit.
How can i make sure robot went into X marked before it exist.?


#2