Question 7:

Let’s follow a line. Go back to the instruction book and add the light sensor. You want it to be ¼ inch or less from the surface. Use a sensor fork to break the program flow into two paths one goes straight if the sensor is on the line, and one turns when the sensor gets off the line. With just one sensor, the robot must follow the edge of a wide line.

 

 

Problem 7 is following a black line. Here you want to use a light sensor fork to choose between the white paper which reflects lots of light and the black line which reflects little light. Somewhere in the middle should work. I used 55%. Basically you want to turn one motor off when the sensor is on the black and turn the other motor off when the sensor is on the white. The car should wobble back and forth along the edge of the line. If you go too fast or the curve of the line is too great, you can loose track. A much better solution uses either 2 light sensors or a proportional control of the motors instead of only off or on. We will talk about that later.

 

 

Question 8

All Questions