EasyManua.ls Logo

LEGO MINDSTORMS Robots

LEGO MINDSTORMS Robots
226 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.
Page 26
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.

Table of Contents

Related product manuals