... | ... | @@ -254,52 +254,6 @@ By integrating from an amount of previous samples, the application can classify |
|
|
As we didn't have any solution of how to set the values in our application for proportional (Kp), integral (Ki), differential (Kd) and base motor power (Tp), we experimented with the values until we had a solution where the robot both drove with a somewhat fast speed and where the movement was fluid on straight lines as well as during turns. See \[8\] for a video of the behaviour.
|
|
|
|
|
|
### Color Sensor ###
|
|
|
|
|
|
Readings from display (putter det i en tabel senere)
|
|
|
|
|
|
On white:
|
|
|
Red: 668, 227
|
|
|
Green: 619, 233
|
|
|
Blue: 587, 288
|
|
|
Light: 625, 227
|
|
|
Color: White
|
|
|
|
|
|
On black:
|
|
|
Red: 246, 60
|
|
|
Green: 227, 64
|
|
|
Blue: 176, 63
|
|
|
Light: 210, 73
|
|
|
Color: Green
|
|
|
|
|
|
On blue:
|
|
|
Red: 291, 97
|
|
|
Green: 401, 120
|
|
|
Blue: 454, 204
|
|
|
Light: 282, 155
|
|
|
Color: Blue
|
|
|
|
|
|
On green:
|
|
|
Red: 360, 130
|
|
|
Green: 494, 222
|
|
|
Blue: 286, 108
|
|
|
Light: 329, 164
|
|
|
Color: Green
|
|
|
|
|
|
On red:
|
|
|
Red: 658, 257
|
|
|
Green: 310, 102
|
|
|
Blue: 246, 60
|
|
|
Light: 482, 144
|
|
|
Color: Red
|
|
|
|
|
|
On yellow:
|
|
|
Red: 670, 266
|
|
|
Green: 550, 234
|
|
|
Blue: 325, 105
|
|
|
Light: 512, 208
|
|
|
Color: Yellow
|
|
|
|
|
|
|
|
|
#### Description ####
|
|
|
In the LEGO Mindstorms series there is also a color sensor. Use the test program *ColorSensorSensor.java* to investigate the information that the class ColorSensor provide in Full mode. Place the color sensor over black, white and green to figure out if the information provided can be used to distinguish the three colors.
|
|
|
|
... | ... | @@ -307,6 +261,7 @@ Is it possible to use the color sensor for both following the black line and sto |
|
|
|
|
|
#### Execution ####
|
|
|
|
|
|
|
|
|
**Actual Color** | **Detected Color** | **Red (Raw)** | **Red (Cal)** | **Green (Raw)** | **Green (Cal)** | **Blue (Raw)** | **Blue (Cal)** | **Light (Raw)** | **Light (Cal)**
|
|
|
---------- | --------- | ----------| --------- | ----------| --------- | ----------| --------- | ----------| ---------
|
|
|
White | White | 668 | 227 | 619 | 233 | 587| 288 | 625 | 277
|
... | ... | @@ -315,6 +270,8 @@ Blue | Blue | 291 | 97 | 401 | 120 | 454 | 204 | 282 | 155 |
|
|
Green | Green | 360 | 130 | 494 | 222 | 286 | 108 | 329 | 164
|
|
|
Red | Red | 658 | 257 | 310 | 102 | 246 | 60 | 482 | 144
|
|
|
Yellow | Yellow | 670 | 266 | 550 | 234 | 325 | 105 | 512 | 208
|
|
|
*Table 5 : Readings from the display while testing ColorSensorSensor.java on 6 different colors*
|
|
|
|
|
|
|
|
|
|
|
|
|
... | ... | |