@@ -120,8 +120,42 @@ The RobotFigure9_9.java was executed without changes and the test was conducted
#### Results:
The robot was placed a few metres from the door. The video (Fig 6) shows the robot turning left and right in order to measure light values to it's sides. It then compares the values and drives towards the door as this area emits most light.
The robot was placed a few metres from the door. The video (Fig 6) shows the robot turn left and right in order to measure light values to it's sides. It then compares the values and drives towards the door as this area emits most light.
[](http://www.youtube.com/watch?v=MUuwSy8rngo)
##### Fig.6 - Observed behavior in a darkened room.
#### Task 2:
Watch the car with only the cruise thread active and then with only the cruise and the follow threads active to observe the behaviors more clearly.
#### Plan:
To make the robot only cruise we outcommented the threads Avoid and Follow. The code is seen in Fig.7
```
CarDriver cd = new CarDriver();
//Escape escape = new Escape(car[0]);
//Avoid avoid = new Avoid(car[1]);
//Follow follow = new Follow(car[2]);
Cruise cruise = new Cruise(car[3]);
Arbiter arbiter = new Arbiter(car, cd);
LCD.drawString("Robot 9.9", 0, 0);
Button.waitForAnyPress();
arbiter.setDaemon(true);
arbiter.start();
// avoid.setDaemon(true);
// avoid.start();
// follow.setDaemon(true);
// follow.start();
cruise.setDaemon(true);
cruise.start();
```
#### Results:
In the video we observe the car with only the cruise thread activated. This means that the car will only drive forward and any other behaviors are inactive.