... | ... | @@ -17,13 +17,27 @@ Follow the exercises one by one, and experiment with values and components. |
|
|
## Results
|
|
|
|
|
|
### Exercise 1 & 2
|
|
|
*Try to place the light sensor above different colors and make a table of light values corresponding to the different colors. Use the light percent values for black and white to explain how the threshold value could be obtained from a reading above black and white.*
|
|
|
|
|
|
The first measurement of light values, was done by placing the light sensor over the different colors and noting the values. The results appear in the table below:
|
|
|
|
|
|
| | Sort | Hvid | Rød | Grøn | Blå | Grå |
|
|
|
|------------- |------ |------ |----- |------ |----- |----- |
|
|
|
| LED tændt | 29 | 39 | 37 | 28 | 28 | 33 |
|
|
|
| LED slukket | 29 | 33 | 29 | 27 | 26 | 24 |
|
|
|
|
|
|
The measurements above seemed off, as some colors reflected less than the black color, and the difference between having the LED on and having the LED off, seemed random. We therefore tested with a different light sensor, which yielded the results below.
|
|
|
|
|
|
| | Sort | Hvid | Rød | Grøn | Blå | Grå |
|
|
|
|------------- |------ |------ |----- |------ |----- |----- |
|
|
|
| LED tændt | 24 | 42 | 40 | 28 | 28 | 34 |
|
|
|
| LED slukket | 18 | 31 | 27 | 22 | 23 | 25 |
|
|
|
|
|
|
These results appear to be more plausible.
|
|
|
|
|
|
To find the value for the blackWhiteThreshold-variable, we added the light values (with the LED turned on) and divided by two, to find the average. This yielded the result: 33
|
|
|
|
|
|
With the LED turned off the observed values were lower, as would be expected, as there is less light to be reflected.
|
|
|
|
|
|
### Exercise 3
|
|
|
|
|
|
### Exercise 4
|
... | ... | |