  The coupling between corrugated surfaces due to the lateral Casimir force is
employed to propose a nanoscale mechanical device composed of two racks and a
pinion. The noncontact nature of the interaction allows for the system to be
made frustrated by choosing the two racks to move in the same direction and
forcing the pinion to choose between two opposite directions. This leads to a
rich and sensitive phase behavior, which makes the device potentially useful as
a mechanical {\em sensor} or {\em amplifier}. The device could also be used to
make a mechanical {\em clock} signal of tunable frequency.
