dinsdag 31 mei 2011

Threads and communication

In this test both bricks are used. We wanted to gain more insight in the situation where multiple threads are running at the same time and the brick has to communicate. The tasks are divided over the 2 bricks as follows.
* Brick 1:
   - Thread  for cliff detection and avoiding them (for now only the right light sensor)
   - Thread for stopping at a lake (middle light sensor)
   - Communication with brick 2
* Brick 2:
   - Performing an experiment after receiving data from brick 1 that the rover is at a lake.
This way multiple tasks are integrated and tested. Unfortunately we couldn't test the program at the Mars setup, so we had to perform this test at the edge of the table. When the right light sensor measures the edge its a cliff and when the middle light sensor measures the edge its a lake. As can be seen, the program works well.
Later on the sensors and actuators are divided differently over the 2 bricks, but for now we wanted to understand this type of situation.

Geen opmerkingen:

Een reactie posten