... | ... | @@ -73,7 +73,7 @@ |
|
|
>#### Plan
|
|
|
>
|
|
|
>
|
|
|
>We implemented a third possibility in the BlackWhiteSensor class, which is green (ref?). The program is still using the light sensor to determine the values of light from the table. With the corrections to the code, we had the possibility to sample black, white and green.
|
|
|
>We implemented a third possibility in the BlackWhiteSensor class, which is green [1]. The program is still using the light sensor to determine the values of light from the table. With the corrections to the code, we had the possibility to sample black, white and green.
|
|
|
>In Lab session 1 (ref?) we used the light sensor to figure out the values of different colors - Green had a value between black and white. We used these findings to determine that we needed two new thresholds in the code. To distinguish between the three different colors we changed the thresholds in the code between white & green and black & green. The white’s values are the highest and the black are the lowest, so in order to determine green, we know that it has to be between black and white.
|
|
|
>
|
|
|
>By calibrating the colors before the cars starts running it is possible to find the median between the colors to create a threshold which leaves room for some error. We also rewrote some of the code to give us the raw values of the lightsensor, as the results between black and green were pretty close when using the readValue() method, this left us with a bit more precise readings and a slightly larger error margin.
|
... | ... | @@ -237,4 +237,5 @@ |
|
|
>
|
|
|
> Links:
|
|
|
>
|
|
|
> [1] https://gitlab.au.dk/group-22/lego/wikis/home - exercise 1 & 2, table 1
|
|
|
> [?] http://www.inpharmix.com/jps/PID_Controller_For_Lego_Mindstorms_Robots.html |
|
|
\ No newline at end of file |