... | @@ -25,12 +25,13 @@ First, you should mount the sensor on the LEGO 9797 car as described in LEGO Min |
... | @@ -25,12 +25,13 @@ First, you should mount the sensor on the LEGO 9797 car as described in LEGO Min |
|
#### Execution ####
|
|
#### Execution ####
|
|
First, we rebuilt the robot to utilise a light sensor. Our initial construction can be seen in <<<<<<indsæt reference til billedet her >>>>>>.
|
|
First, we rebuilt the robot to utilise a light sensor. Our initial construction can be seen in <<<<<<indsæt reference til billedet her >>>>>>.
|
|

|
|

|
|
Secondly, we programmed an application which used the *BlackWhiteSensor.java* <<<<<<indsæt reference til koden her >>>>>> to classify colors as either white or black. This application can be seen <<<<<indsæt kode eller reference til git med kode>>>>>>.
|
|
Secondly, we programmed an application which used the *BlackWhiteSensor.java* <<<<<<indsæt reference til koden her >>>>>> class to classify colors as either white or black. This application can be seen <<<<<indsæt kode eller reference til git med kode>>>>>>.
|
|
|
|
|
|
|
|
The *BlackWhiteSensor.java* class also prints light values to the display as a percentage <<<<indsæt reference til hvor dette er kendt fra >>>>>. We noted these below.
|
|
|
|
White | Black
|
|
|
|
--- | ---
|
|
|
|
51| 33
|
|
|
|
|
|
Markdown | Less | Pretty
|
|
|
|
--- | --- | ---
|
|
|
|
*Still* | `renders` | **nicely**
|
|
|
|
1 | 2 | 3
|
|
|
|
// The threshold is calculated as the median between
|
|
// The threshold is calculated as the median between
|
|
// the two readings over the two types of surfaces
|
|
// the two readings over the two types of surfaces
|
|
- Virkede fint.
|
|
- Virkede fint.
|
... | | ... | |