Lab 4, CS 106

Background and Motivation: In this lab you will use the line following sensors to make relatievely simple decisions about your robot's actions.
If you are working on project 1 in a group, you may want to work in the same group for this lab so that you can return to the project when finished with this lab.

Step 1: Toe the Line

Using the line sensor (you may need to look at the Myro documentation to remember what method(s) to use), get your Scribbler to follow a line. You should be able to follow the relatievely straight line. An extra challenge is to follow the line with lots of turns.

Step 2: Betware the Vicious Circle

Instead of following a line, create a program to move around within an area closed in by a line. The robot should go forward until it hits a border. It can then turn and go forward in another direction, provided it does not exit the enclosed area.



When done, please demonstrate steps 1 and 2 to Matt.

Submit your java code via moodle by Friday 11:59pm, March 9th.