A Simple Program - LEGO MINDSTORMS Robots Manual

Unofficial guide
Table of Contents

Advertisement

A Simple Program

Now that you've built a robot, you need a program to make it work. Hank's mission in life is to explore the world.
His basic program works something like this:
go forward
if I've bumped into something
back up
turn away from the obstacle
start over
This program translates pretty simply into the RIS programming environment, as shown in Figure 2-6. The program assumes that the two motors are attached to outputs A and C, while the touch
sensors should be attached to inputs 1 and 3.
Page 26

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MINDSTORMS Robots and is the answer not in the manual?

Questions and answers

Table of Contents