CMPE 117 - Homework 5

The Assignment: A Light-Seeking Robot in LegOS

You have to write the C code, based on the operating system LegOS, for a robot that seeks the light. Although this is not a requirement, you can base your code on the esterel code used in the previous assignment.

For extra credit, you can use two robots, and coordinate their actions by sending messages. For an example of how to use LNP, the Lego Networking Protocol, see bytedance1.c and bytedance2.c. Note that all Mindstorms, by default, have address 0 (this default can be changed by recompiling legOS, but maybe don't do it for this assignment). You can distinguish who is the intended recipient of a packet by using port numbers as addresses. Note that port number 0 is reserved by the legOS loader. Valid port numbers are thus 1..15.

Homework Submission

Submit the code as an attachment by email to luca@soe, by Friday May 31. Indicate in the assignment with whom you worked, and which portions of the program you were responsible for.


Luca de Alfaro