moto42 created page: home authored by Morten Vemmelund Brøgger-Jensen's avatar Morten Vemmelund Brøgger-Jensen
...@@ -13,11 +13,10 @@ ...@@ -13,11 +13,10 @@
**Activity duration:** 6 hours **Activity duration:** 6 hours
## Goal ## Goal
What is the goal?
Complete the given exercises and make sure our setup is working smoothly. Complete the given exercises and make sure our setup is working smoothly.
## Plan ## Plan
What is your plan to reach the goal?
We plan to work during the labs hours and divide the responsibilities among us (running the experiments, recording the experiments and taking notes on the experiments). We plan to work during the labs hours and divide the responsibilities among us (running the experiments, recording the experiments and taking notes on the experiments).
...@@ -25,6 +24,11 @@ We plan to work during the labs hours and divide the responsibilities among us ( ...@@ -25,6 +24,11 @@ We plan to work during the labs hours and divide the responsibilities among us (
### Exercise 1 ### Exercise 1
| | White | Black | Blue | Green | Red | Yellow |
|-----+-------+-------+------+-------+-----+--------|
| On | 54% | 33% | 36% | 40% | 56% | 54% |
| Off | 32% | 19% | 24% | 26% | 30% | 31% |
### Exercise 2 ### Exercise 2
```java ```java
...@@ -33,31 +37,41 @@ light.setFloodlight(false); ...@@ -33,31 +37,41 @@ light.setFloodlight(false);
### Exercise 3 ### Exercise 3
To change the sampling interval we changed the values of the following variable.
```java
final int sampleInterval = 100; // ms
```
### Exercise 4 ### Exercise 4
Again we change the sampleInterval, but this time to 10, 20 40, 80.
### Exercise 5 ### Exercise 5
The light conditions doing the experiment was little to no natural light with indoor lighting. [What does this influence?]
with LED off: 184 when flashlight directly into the sensor. 878 when covering with a hand.
### Exercise 6 ### Exercise 6
The experiment was to see the difference in heap size when using String literal directly in the call versus declaring a variable and referencing that.
The initial code was referencing a variable as in the following example:
```java
String left = "Turn left ";
...
LCD.drawString(left, 0, 1);
```
Using `Runtime.getRuntime().freeMemory()` we got the available memory, which we then wrote to the screen so
Running
```java
LCD.drawString("Turn left ", 0, 1);
```
when using strings litterals: 56152 free mem.
when using variables: 56664 free mem.
## Conclusion ## Conclusion
## References ## References
\ No newline at end of file
Which looks like this
Group ??
Lab Notebook ??
Date: ??/?? 2015
Group members participating: ??, ??, ??, ??
Activity duration: ?? hours
Goal
What is the goal?
Plan
What is your plan to reach the goal?
Results
Exercise 1
Exercise 2
And so on??
Conclusion
References
\ No newline at end of file