Quick Start Guide
© Modular Robotics, 2016 www.modrobotics.comPage 15
16. Use The Minimum Block as a Switch
Suppose you want to make a light-sensitive
Gobot—it goes when it sees light. But you also
want to be able to turn it off. Of course, you
can just switch off the battery, or take out the
Battery block. But you can also use Cubelets
to make an on-off switch. Here’s how.
An ordinary Light-sensitive Gobot just has
two blocks: a Brightness Sense block and a
Drive Action block (plus a Battery block). The
number from the Brightness Sense block
tells the Drive Action block how fast to go. A
brighter light, a bigger number, a faster go-
bot.
Take out the Brightness Sense block and
put a Minimum Think block in its place. This
Minimum Think block will tell the Drive Action
block how fast to go. It will take all the
numbers its Sense block neighbors give it,
and choose the smallest (minimum) of those
numbers. This smallest number is what it will
pass on to its Action block neighbors.