Page 126 - Hacking Roomba
P. 126
Chapter 5 — Driving Roomba 107
Listing 5-6 Continued
pack();
setResizable(false);
setVisible(true);
}
}
Writing Logo-Like Programs
In the 1980s a computer programming language called Logo became popular, targeted toward
kids or others with little computer experience. It was famous for turtle graphics, a method of
drawing images on the screen by moving a virtual turtle around that had a pen strapped to it.
Although anyone who knew Logo knew about this scribbling turtle, Logo originally didn’t
have it when it was invented in the late 1960s. The turtle idea came about afterward from a
real radio-controlled floor roaming robot named Irving that had touch sensors and could move
backward and forward and rotate left and right. Sound familiar?
Logo programs could be very simple, like this one to draw a square:
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
When the program was run, it would output an image like Figure 5-9.
FIGURE 5-9: Logo output for the square program