... | ... | @@ -88,7 +88,18 @@ By using the light percent formula you lose a lot of decimals, so one could say |
|
|
### Exercise 6
|
|
|
In this exercise we try to use text strings in the calls to LCD.drawString instead of the variables right and left and use Runtime.getRuntime().freeMemory() to display the amount of free memory on the heap during the execution.
|
|
|
|
|
|
Blue: Sending via variable
|
|
|
Red: Sending with string
|
|
|
|
|
|
![Screen Shot 2015-02-17 at 12.45.50](http://gitlab.au.dk/uploads/u4099/legolabtimadala/f89bbd6649/Screen_Shot_2015-02-17_at_12.45.50.png)
|
|
|
|
|
|
The graph indicates that running with variable results in slower allocation than running with with a string.
|
|
|
|
|
|
## Conclusion
|
|
|
|
|
|
In the first two exercises we discovered that having the floodlight set off impacted the measurements extensively. It was harder to differ the different colors and it was more responsive to natural light which had an impact on the measurements.
|
|
|
The results from changing the sample interval showed that a greater time span between measurements, caused the LEGO car to not be able to follow the black line as accurately as if we used a shorter period of time between measurements.
|
|
|
In regards to the formula for the relation between the light percentage and the raw values we saw that the formula always round the decimals down, so the accuracy was lower than the raw values, however they were still within an acceptable area. In the last exercise we saw that the allocation were slower running with a variable.
|
|
|
|
|
|
## References
|
|
|
http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson1.dir/Lesson.html |
|
|
\ No newline at end of file |
|
|
http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson1.dir/Lesson.html![Screen Shot 2015-02-17 at 12.45.50](http://gitlab.au.dk/uploads/u4099/legolabtimadala/f89bbd6649/Screen_Shot_2015-02-17_at_12.45.50.png) |
|
|
\ No newline at end of file |