This is my robotic project from loges

This week in computer science we learned about robots. We had to build a robot in 10 minutes. The key features of this is that the robot had two motors and two sensors. The two sensors that the robot had were one was a sonar and other was touch. The sonar sends a sound the sound well bounce off of objects and go back the sonar. The sonar will use the time it took the sound to come back and figure out how far away it is.The touch sensor is checks if it is being touched.

As you can see the picture right above that is a code. The code that is right above us is a code that makes the robot move and grab objects. Also their is a sensor that detects color and when detects the color it will not get out of it zone. The reason it wont get out of its zone is because the color is surrounded by the color you want to detect. If you want it to detect another color