... | ... | @@ -224,18 +224,33 @@ We implemented a simple integer that was increased by one when the threshold was |
|
|
>
|
|
|
> The table shows red, green and blue readings on different paper colors. White paper results in high values and black paper results in low values. Green paper has values higher than black but lower than white.
|
|
|
>
|
|
|
>In order to use these values to distinguish between the three colors we suggest looking at the raw values as they are the most accurate readings the sensor can provide. If we want to detect green color we look at the raw color sensor value "Green". If this value is significantly higher (should invesigated further) than the raw values of red and blue, the color is green. If we want to detect the color black we will look at the color sensors getRawLightValue()(ref). If the light value is low the color is black. Likewise if it is high the color is white. The reason why the color sensor might be better than the light sensor is that it not only serves as a color detector but also a light detector.
|
|
|
>In order to use these values to distinguish between the three colors we suggest looking at the raw values as they are the most accurate readings the sensor can provide. If we want to detect green color we look at the raw color sensor value "Green". If this value is significantly higher (should invesigated further) than the raw values of red and blue, the color is green. If we want to detect the color black we will look at the color sensors getRawLightValue(). If the light value is low the color is black. Likewise if it is high the color is white. The reason why the color sensor might be better than the light sensor is that it not only serves as a color detector but also a light detector.
|
|
|
>
|
|
|
>This method is not 100 % accurate and some colors close to green may also result in a green interpretation, but it >should still be able to distinguish the three colors apart.
|
|
|
>This method is not 100 % accurate and some colors close to green may also result in a green interpretation, but it should still be able to distinguish the three colors apart.
|
|
|
>
|
|
|
> ## Conclusion
|
|
|
> Through this lab session we gained experience using a light sensor for black white >detection. Readings were collected in different rooms with different light settings and >results showed that we were able to distinguish black from white under various light >settings.
|
|
|
>
|
|
|
>To extend our work with the light sensor we mounted the color sensor with a goal to >distinguish between three colors (black, white and green). When implementing a line follower >we encountered some problems with the three color distinction as the car robot’s navigation >relies on input from the color sensor. When it detects white it moves in one direction and >another when it detects green. The problem occurs when the sensor is between the black and >white line. This causes the sensor to read medium values eg. green even though no green space >is present.
|
|
|
>
|
|
|
>The three color sensing robot was later modified according to the problem. To deal with the >problem of medium values we made the robot count how many green readings were made before it >detects it as a goal zone. This means that the robot will only stop when it reads a certain >amount of consecutive green values.
|
|
|
>
|
|
|
>Later we implemented a PID control structure on the car resulting in the car driving in a >smooth path. Due to lack of time we did not have adequate time to explore and tweak the >values of the PID. This means that the PID controlled line follower was not completed to full >extend.
|
|
|
> Through this lab session we gained experience using a light sensor for black white
|
|
|
> detection. Readings were collected in different rooms with different light settings and
|
|
|
> results showed that we were able to distinguish black from white under various light
|
|
|
> settings.
|
|
|
>
|
|
|
> To extend our work with the light sensor we mounted the color sensor with a goal to
|
|
|
> distinguish between three colors (black, white and green). When implementing a line follower
|
|
|
> we encountered some problems with the three color distinction as the car robot’s navigation
|
|
|
> relies on input from the color sensor. When it detects white it moves in one direction and
|
|
|
> another when it detects green. The problem occurs when the sensor is between the black and
|
|
|
> white line. This causes the sensor to read medium values eg. green even though no green
|
|
|
> space >is present.
|
|
|
>
|
|
|
> The three color sensing robot was later modified according to the problem. To deal with the
|
|
|
> problem of medium values we made the robot count how many green readings were made before it
|
|
|
> detects it as a goal zone. This means that the robot will only stop when it reads a certain
|
|
|
> amount of consecutive green values.
|
|
|
>
|
|
|
> Later we implemented a PID control structure on the car resulting in the car driving in a
|
|
|
> smooth path. Due to lack of time we did not have adequate time to explore and tweak the
|
|
|
> values of the PID. This means that the PID controlled line follower was not completed to
|
|
|
> full extend.
|
|
|
>
|
|
|
> ## References
|
|
|
>
|
... | ... | |