CPS196 - Fall 1999

Lego Intro

Reading: Lego Stuff

Background: To get started with the robots, you'll need to read Fred Martin's construction guide (a compressed postscript version is also available). Another useful resource is Luis's Lego Manual (also available in postscript), which you should skim (it'll be more helpful to you when you are working on projects).

A. Questions (HOWTO):

  1. Both the manual and the OS itself are works in progress. Is there anything you would do to improve either one?
  2. What are the limitations of the OS? Are there workarounds that are obvious?
  3. What about the limitations of the chip and other hardware? Think about this in terms of what you would like a robot to do.
  4. What is the importance of threading? This may seem obvious to those who have taken CPS 110, but try to think about it in the context of robotics and interaction with the real world.
B. Questions (Construction guide):
  1. If you built Legos as a kid, is this a different perspective on Lego construction than you are used to? In what way?
  2. What kinds of higher-level structures do you expect to use in your robot? (For example: bumpers, treads, etc.) How do you expect to use the basic structures presented in this guide to work into these more abstract structures?
  3. Once you get a kit, take a look at the case that carries the chip and batteries. Before you read through this, how would you have mounted structures to the case? After?

Offline: Robot Intro

Objective: To construct a simple but sturdy Lego robot and familizarize yourself with basic coding in LegOS, including the use of the cross-compiler and downloading tools.

Project: Construct a mobile lego robot of some type: tracked, wheeled, or otherwise. The robot should be able to do the following when started: First, follow the outline of a square 2'X2' in size, without actually "looking" at the square. In other words, go two feet in a straight line, turn 90 degrees, and repeat. When it has completed the square, it should continue moving forward until it runs into a wall. This event should be recognized by some type of bumper or other device, causing the robot to stop, pause for one second, and display the word "done" on the LCD.

Notes: by Cyrus Adkisson

Windows version of packaged lego software is inadequate.

LegOS, written by a German student, is an OS for legos that lets the user have better control over the robots.

Limitations --- (on web)

Your first lego will break when it hits the wall.

Downloading to robot may take a minute or two, so you will get frustrated.

LegOS uses threads to run different sets of instructions simultaneously. You may need to do extra clean-up after killing a process.

Light sensors have two modes: active-passive.

You may want to make your lego so that it is easy to pop a battery out to reset the brick.

cputs (sorta equivalent to cout) displays text on the LCD.

Photos: by Michail Lagoudakis

We gave out the robots to Group I, Group II, Group III, Group IV, and poor Group V (who had to use a "used" kit).
Modified: Wed Sep 1 23:37:51 EDT 1999 by Luis Villa liv@cs.duke.edu and Michael Littman, mlittman@cs.duke.edu