Lawrence Technological University
College of Arts and Science
Department of Mathematics and Computer Sciences
Highlights from the Summer of 2005
This is a rather lengthy page. Let me draw your attention to two
modules that worked quite well. These "lesson plans" happened to be
mine. However, I am sure their success was largely due to their
masterful implementation by Brian Meter.
- As a gentle introduction to the idea of writing a program on
a laptop and transferring the program to run on the yellow
LEGO Mindstorms brick, we used the music playing
capabilities of the brick. This exercise requires no
assembly time. This exercise is easier to do with with NQC
and the Bricx Command Center (with its piano player) than
with RCX or Robolab code. The musical concept that a note
has both pitch and duration is introduced. Since the
Mindstorms firmware hands off the actual playing of the note
to another process and continues on, the concepts of queues
and multitasking can be introduced while arranging pauses
- After introducing the way gears can speed things up, the campers
learned to use a worm gear to slow things way down. A small
piece of dowel drilled to fit a LEGO axle on one end and a thin
bamboo kebob skewer on the other is all that is needed to use
the Mindstorms kit as a marshmallow toaster. (Duct tape will
"Building Blocks" for a short Summer Camp in Robotics
The following is a series of approximately 1 hour units of camp
activity. The theme is that of the LEGO Mindstorms kit. That
is, to have fun while moving from "playing with LEGOs" to
building and programming autonomous robots.
This list is beginning in outline form and can be expanded.
I will be happy to add requested topics and comments from
campers and camp teachers.
This is intended for a camp of about 15 hours over 1 week. There
would be about 10 campers and 5 computers and 5 LEGO Mindstorms kits.
I would like to help you plan your camp by email
Please let me know
- Your name and preferred email address
- Your camp's location, dates and times
- Your campers' grade, interests and previous LEGO experience
- The session units you think would be best for your camp
A few general thoughts as you make your selections
- Some of these depend on other units and some depend on mathematics
learned in regular classes.
- During our preparation for Robofest 2005 workshops, we needed to
focus on programming a rather vanilla robot. The most frequent
request I received was, "When can we learn more about building?"
- Choosing a programming platform is a good starting point for
your planning. The most stable platforms for programming
the Yellow RCX Brick are RCX Code, RoboLab and NotQuiteC.
Do not be afraid of the text based programming language NQC!
Acknowledging my bias as a teacher of programming,
- When Papert wrote Logo, more than a quarter century ago,
it was of course text based. He showed that 4th graders
could easily use his language.
- A "well-written, uncommented program" is an oxymoron.
Comments and making your program readable and
understandable for other people is harder with icon based
programming. Hard enough that icon programmers usually
never learn this important communication skill.
- Writing a program plan in programming language independent
text (pseudo-code) does take some time and practice. Many
of our university students still do not understand that
skipping this step wastes even more time during
- RoboLab is an extra cost item.
- NQC is free on Windows, Linux and Mac.
- NQC is still in active development and RCX Code is not.
- On some Windows laptops, the sleep mode can disrupt the IR
tower communications so that the computer needs to be
rebooted. The NQC IR tower driver is more up to date and
seems less prone to this source of teacher and camper
- Dr. Chung has found that young children, new to the LEGO
Mindstorms system, learn the icon based RCX Code quickly and
- To give campers with some LEGO experience, a headstart on
the next Robofest, consider NQC. As a programming judge,
I often heard the most positive remarks about text based
programming from participants in their second or third
Robofest. These young programmers usually had tried icon
based programming first and then appreciated the greater
control and power of the text based language.
Select from these, or add some of your own, to tailor a 15 hour
(3 hours x 5 days) curriculum that is best for your group of
- Introductions. The steady upward trends: not the population
of Detroit, not MEAP scores, but the number of computer
controlled systems in cars. Radio control toys versus
autonomous robots. The ideas of sensors, decision making
and multitasking. A car with a human driver encounters a
slower car ahead. A car with a computer driver encounters a
slower car ahead. The idea of cross platform development.
Writing your program on a laptop computer and translating it
to instructions your robot can understand. Perhaps a demo
with a prebuilt robot and a simple "go forward" program.
- A little non Euclidean geometry. A circle is all the points
equidistant from the center. What to do if your robot's arm
is too short to reach the center? Make a triangle by
set the number-of-sides to 3
repeat number-of-sides times:
turn left 360 / number-of-sides degrees
go forward a bit
Then make a square, etc. A demo with a prebuilt robot would
help. You could also use Logo. See Brian Harvey's Home
- Beams, blocks and plates. Axles. Pegs. All those other
pieces. A hunt for
A challenge to spell LEGO in axles.
- pegs for mounting gears,
- pegs that can help lock a beam to the RCX yellow brick,
- pegs that can help lock a pulley to a beam,
- pegs that can join 3 beams at once,
- 1/2 size axle spacers,
- a part where 3 stacked together is the same size as a brick,
- a part to make long axles out of shorter ones,
- a gear that meshes with the smallest gear so that it turns
just once each time the smallest gear turns 3 times,
- Playing music with the RCX brick. This could be a 1 hour or
1 day session. This is an opportunity to introduce programming
without any mechanical or construction distractions. The
RCX brick can be combined with other musical voices. Expect
absolutely no musical help from me.
Musical note frequencies in Hz (from an equal tempered
scale rounded to integers, assuming A above middle C is 440 Hz)
More examples of getting music from the Yellow Brick
A second objective of this topic is to introduce the idea of
multitasking. The students can hear two processes going on
at the same time. Because waiting and playing are being
done at the same time by two different processes, to play a
note for a second, pause a second, then play a second note,
in pseudo code:
play tone A, 1
play tone C, 1
Does not pause!
play tone A, 1
play tone C, 1
- The LEGO unit of measure. The 3-4-5 triangle and bracing
and locking. Sturdy construction with locked squares and
triangles. Getting the holes in the beams to line up so
pegs fit. A challenge to make the smallest possible locked
square with just beams and plates and pegs.
- LEGO gears and pulleys. Changing speed with gears. Changing
direction with idler gears. Power and gear ratio. Gears need
nearly exact spacing to mesh. A pulley and belt system is more
- LEGO motors. Programming speed, direction and braking.
Motors and generators. An unconnected motor. A motor
connected by a wire to another motor. A motor connected to
itself by a reversed wire. Mounting motors. Those little 1
x 2 plates with the tabs. Worm gears, bevel gears and rack
- A crane with 1 motor that lifts a load. Stop the lifting with
braking and then with coasting. Adding push button controls
to the crane with touch sensors.
- Gears and power lifting and speed lifting with the crane.
Using two motors together for more power.
- A robot with 2 motors, 1 for each driving wheel.
- Driving straight with the wheeled robot. Faster with gears.
- Driving up a ramp with the wheeled robot. Faster with gears?
- A straight line "drag race".
- Turning with the wheeled robot.
- LEGO sensors overview.
- The passive light sensor. Turn to a flashlight. Easy
- Staying "in the spotlight". Not so easy.
- The active light sensor. Follow a line.
- A Race around an oval black line.
- A simple maze made out of lines. Following one "wall" with
the light sensor.
- The touch sensor. Stop at a wood block wall.
- Building a 2 position (open, closed) hand.
- Grabbing an aluminum beverage can.
- Robot to Robot communication with IR messages.
- A relay race with an IR message baton..
- A relay race with an aluminum beverage can baton. Not so easy.
- Robot 1, with a touch senor, finds an obstacle and tells Robot
2, without a touch sensor, how to avoid the obstacle.
- A secret code. A guessing game strategy for code breaking.
- A "parking lot" gate or an automatic garage door opener.
Using a touch sensor or IR message.
- Sorting Tic-Tacs and Necco Wafers on a LEGO tread conveyor
belt. Not so easy.
If you are new to the LEGO Mindstorms kit you might want to
read over What's in the box?
Make a plan. For example, with a camp of predominately beginning
- Day 1
- An introduction using the 1st 3 topics. A prebuilt robot to
move in a square. An experiment for digital age students --
a small, partial clock mechanism that shows the use of gears
and spacers. There is a 24 tooth gear driven by a worm
gear. The worm gear has a spacer between it and the back
beam. In this minimal design there is no spacer on the axle
in front of the worm gear, and there is only 1 side wall of
beams. Notice the use of plates and 1/2 width spacers to
keep the gears aligned.
- If the lower pulley is the minute hand, and the upper pulley
is the hour hand, is the time shown 9:30 or 18:30? That is,
is this a 12 or 24 hour clock?
- Can you set the clock back by turning the minute hand back?
What additional pieces would it take to allow this?
- Can you turn the minute hand by turning the hour hand
forward or backward?
- Day 2
- An introduction to programming using the music topic.
- Day 3
- An introduction to construction using topics 5, 6 and 7 followed
by making a 2 motor robot. Go forward.
- Day 4
- Turning the robot from Day 3. Adding a line following sensor.
Making decisions and following a line.
- Day 5
- A race around an oval black line. You can make an oval out
of black electrical tape. Or you can take this tiny file oval.ps to any Fedex-Kinko's with a large
format, Postscript printer. This file is for 36 inch wide
paper rolls (cut sheet paper sizes: c0, isob0, a0 or archE),
but is easily changed with a text editor like NotePad. This
printed oval line is wider and a little easier for beginning
programmers to follow than the electrical tape.
Things you might want to do ahead of time to get your camp off
to a smooth start
- Make sure you have enough available electrical outlets and spare
AA batteries. Most laptop batteries will not last 3 hours.
RCX 2.0 bricks do not have a place to plug in a power adapter and
so will likely need at least 1 change of batteries in 15 hours of
- Internet access and a projector would be a help.
- You will need some administrative access to your laptop computers,
so that you can install the needed software.
- Install the RCX software from the CD-ROM in the Mindstorms kit.
- Install NQC with the version of the Bricx Command Center for
your operating system.
- Download a copy of the RCX 2.0 firmware so you can restart
when everything else fails. Go to SDK
2.0 Beta and then you can extract and save firm0328.lgo
- Practice a little construction with the LEGO Mindstorms
- Try some programming by doing one of the many available tutorials.
Revised August 27, 2005