First,we want to make our mbot go the black line,and when it meet the barriers it will turn right or left in random,but our program make our mbot not go the black. As a result, our mbot will stop when encountering the black line.When it drive to the black line,its light of sensor will turn off the light.