... | ... | @@ -153,4 +153,9 @@ We intend to base our Java program for following walls on the overall structure |
|
|
dl.writeSample(distance);
|
|
|
Delay.msDelay(sampleInterval);
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
Fig. 3 - Code from our custom java version of Philippe's NQC program.
|
|
|
|
|
|
We expected the desired distance to the wall to be between 50 and 55 cm. If the robot moves too close three if statements will make corrections accordingly. The same applies if the robot moves too far away from the wall where two if statements are ready to move it closer.
|
|
|
|
|
|
We tested our implementation of the program by making the robot run a simple course (see fig 4). A video of the run can be seen here: https://drive.google.com/open?id=0B4Vn_sxU595gbVhnUFVyWmlyaFE&authuser=0 |
|
|
\ No newline at end of file |