final project writeup template doc
demos Fri Dec 17, 10 am
writeup due Mon Dec 20
contest writeup html
due Mon Nov 22
servo jitter fix html
egg hunt html
due Mon Nov 1
lab 4 html
due Fri Oct 15
lab 3 html
due Mon Oct 4
lab 2 html
due Mon Sep 27
lab 1 html
art of lego design pdf
due Mon Sep 20
To format for printing, click here.
91.450 Lab 2: Bumpers and Line-Following
For next Friday's lecture, please read Chapter 1 (Whence
Behavior?) and Chapter 2 (Animal Behavior) from
In this lab, we will program the Handy Bug to avoid obstacles by
backing up and turning when one of the bump sensors is hit. Then we
will modify the Handy Bug to include a light sensor so that it can
follow a black line.
Part A: Touch Sensing and Turtle Movement
- In Robotic Explorations, read Section 2.1,
Interactive C and the Handy Board, which introduces the
hardware/software system. You should also read Appendix E, which is
the IC (Interactive C) manual, and/or look through the help file that
comes with the software.
- Now go to Section 2.3, which describes the first program that
youll write in IC. You will need to install touch sensors in
your robot. The best way is to use the LEGO touch sensors as
illustrated in the book; or you can use double-side tape to attach the
two button touch sensors to the 1x2 bricks that are behind the wheels
on the bumpers.
- Answer the four obstacle avoidance exercises of Section 2.3.3
(page 73). Turn in answers to these questions with your lab report.
- For Question 3, turn in a copy of your code (which will be
beautifully commented, Im sure).
- For Question 4, compare the performance of your Handy Bug to the
lab's Weazel ball toy. Does your robot beat the Weazel ball?
- Now move on to Section 2.3.4, Turtle Movements. Do
the two exercises in Section 2.3.5. For Question 2, turn in your code
(again, with useful comments).
Part B: Line-Following
In Steps 14, youve created a robot that will go
forward. If it hits an obstacle on either side of the bumper, it will
back up and then turn towards the open direction (i.e., if it hits on
the right, it will back up and turn to the left, and vice versa).
Now you will create a robot that will follow a black line on a
white background. For this part of the lab, you will need to use the
reflective IR sensors, which plug into the analog ports.
- Experiment with the reflective IR sensors to determine what they
read when placed over white paper and what they read over black lines.
Is there a difference between shiny and flat surfaces? Choose ranges
that would indicate black readings and white readings. Note: you may
wish to have some dead zone between the two colors, depending upon
- If you are trying to follow a black line on a white background,
discuss algorithmic differences between using one reflective IR sensor
and using two reflective IR sensors.
- Now you will write the program that will allow your Handy Bug
to follow a line. You may choose whether to use one reflective IR or
two. Please discuss in your lab report why you chose the number you
did. Choose good mount locations for your sensor(s) and attach them
to the robot. The best way is to hot-glue one or two LEGO pices to
the sensor (thereby, LEGOizing it) and then using the LEGO
properties to attach to your chassis. Note: Glue and LEGO must be
used sparingly!! Use glue only to create modular partsfor
example, gluing a 2x4 brick to a light sensor!
Write the code to follow a black line. Turn in your code (need I
mention comments again?).
- Was your robot able to traverse the entire course? If not,
what part did it fail on? Why?
Create an entry for your line-following robot in the Invention
Database. Include a photo, description of its behavior, and its code
in the entry.
Print out your code for the different parts and attach answers to each
of the questions raised above. Each team only needs to submit one lab
report; however, I strongly encourage you to write the report together
so that both members of the team participate in all aspects of the
Include the URL to your Invention Database robot in the lab report.
Your lab report is due at the beginning of class (1:30 pm) on
Monday, 27 September 2004.
In addition to the lab report, you will demonstrate your line
following robot during class on the Monday.
- Part A.3, 1 point for each of the 4 items.
- Part A.4, 2 points for code listing (with embedded comments).
- Part B.2, 2 points for discussion of line-following algorithm.
- Part B.3, 3 points for line-following code listing/comments.
- Part B.4, 2 points for discussion of its performance.
- 2 points for Invention Database entry.
- 3 points for overall presentation, clarity, and grammatical
Friday, 17-Sep-2004 12:41:29 EDT