Page 177 -
P. 177
243_masterpieces_03.qxd 4/18/03 7:02 PM Page 149
The LEGO Turning Machine • Masterpiece 3 149
Table 3.5 Steps for Solving the “N div 2” Problem
State Tape
0
1
2
2
2
3
4
5
5
5
0
1
2
3
3
4
4
5
0
Stop
A more complex approach would consist of having the machine programmable from
outside, and not from software that you have to recode every time.To do this, you should
build a state transition table with some pieces like plates of different colors, and a reader
that interprets and store the information.This is quite a difficult task to do, and you’ll
need a second RCX unit dedicated to this job, because at least two motors and one
sensor are needed.
You can also try to build the same machine with fewer resources. For example, you
could save one motor by using only one for the entire switch mechanism.This requires a
complex structure in which running the motor in its two directions operate one switch or
the other.The return of the pushing arm could be helped by using a small rubber band.
Another addition could be a mechanism to write and erase symbols on the tape (for
its initial setup) without having to manually act on the tape.You should use buttons or

