... | ... | @@ -60,7 +60,7 @@ Use the idea and structure of the BlackWhiteSensor to program a class ThreeColor |
|
|
- Vi udnytter thresholds ved at bruge < og > til at sammenligne over thresholds (mindre end black-green -> black, mindre end green-white -> grøn, større end green-white -> hvid)
|
|
|
- Da det er Integers rundes der altid ned. Der er altså en tendens til at favorisere mørke værdier. Vi kunne anvende raw values i stedet. I så fald ville vi have 1023 værdier at gå ud fra, og ville derfor kunne bedømme edge cases bedre.
|
|
|
|
|
|
We extended the behaviour of *BlackWhiteSensor.java* to calibrate for green as well as the black and white. The extended application can be seen in <<<<<<indsæt ref til kode, eller indsæt kode>>>>>>.
|
|
|
We extended the behaviour of *BlackWhiteSensor.java* to calibrate for green as well as the black and white. In this application, thresholds between black-green and green-white were used instead of black-white. This happened under assumption that any color would always have a value between absolute white and The extended application can be seen in <<<<<<indsæt ref til kode FOR BEGGE FILER, eller indsæt kode>>>>>>.
|
|
|
|
|
|
Having done this, we installed the program on the robot and started classifying black, white and green. The green color was dark green and was thus very close to black for the light sensor.
|
|
|
|
... | ... | |