Getting Started Guide 1860 38th St. Boulder, CO 80301 www.modrobotics.
1. Make Your First Robot The Dimbot – Uses a clear Flashlight Action block, black Distance Sense block, and a blueish-gray Battery block. It doesn’t matter where you put the Battery block. When you snap together a Battery block, a Distance Sense block, and a Flashlight Action block, the Flashlight Action block lights up. You control its brightness by moving your hand or an object closer or further from the “eyes” on the black Distance block.
. What’s a Robot? A robot is a machine that senses its surroundings and acts on its surroundings. Every robot needs a Sense block and an Action block. Sense blocks are black and Action blocks are clear. an on-off switch. Make sure it’s on before you start to play; turn it off when you’re done. To build a robot, you will need a gray block, a black block, and a clear block. Just snap them together and you’ve built a robot! Every robot needs power. The blue-gray block is the Battery block.
5. Swap Action Blocks This simple brightness go-bot robot has a Drive Action block (left) that moves the robot when its Brightness Sense block sees light. The gray block on the right is the Battery block. You can also swap Action blocks. With a Lightsensitive Dimbot now put a Drive Action block in place of the Flashlight Action block. Now your robot has a Brightness Sense and a Drive block (and, of course, a Battery block). This robot moves when it senses light. In a bright room it’s a fast robot.
6. How Numbers Flow The arrow shows the flow of a number from the Brightness Sense block to the Flashlight Action block. Each black Sense block senses some property of its surroundings and turns it into a number. Each Sense block tells its number to all its neighbors. You can see them “talking” as the green lights on each block flicker. (The Bluetooth flashes different colors.) For example, the Knob Sense block senses how much you rotate its knob.
7. Using the Bar Graph to See the Numbers You can use the Bar Graph Action block to understand what’s going on inside your robot—to show the numbers flowing from block to block. Attach the Bar Graph Action block to any block in a robot. The Bar Graph Action block shows how big the number is. If the number is big, all the cells in the bar graph light. If the number is small, only a few light up. If the number is very small (or zero) no cells light at all. Try it.
For example, make a robot and place the Brightness Sense block so its sensor face points down. Now it doesn’t see the light. This Gobot is a Nogobot. No matter how bright the room is, the robot won’t go. Its Brightness Sense block doesn’t sense the light. Try placing the Brightness Sense block to face in different directions. How does that impact the robot’s behavior? 9. Stability Some robots are more stable than others.
If you build this robot as a tower instead of a train, it still works, but it’s no longer stable: approach the Distance Sense block and the Drive Action block starts moving. Accelerate too quickly and the tower falls over. You can fix this: add a block at the bottom next to the Drive Action block. Any block will do, but try one of the green blocks, either a Passive block or a Blocker block. Notice that you can build this Gobot in different ways.
10. A Sense Can Control Multiple Action Blocks You can use a single Sense block to control one or more Action blocks. Build a Lighthousebot that uses the Knob Sense block to control the speed and the brightness of a rotating robot tower. The Lighthousebot uses the Knob Sense block to control the speed of the Rotate Action block and the brightness of the Flashlight Action block. Build a simple Gobot with a Brightness Sense block and a Drive Action block: It goes when it senses light.
11. Think Blocks You’ve met the Battery block, and the black Sense blocks and the clear Action blocks. It’s time to meet the colored Think blocks. Think blocks are the colored blocks. Because Robots are machines that sense first, then think, then act, we need to be sure Think blocks are placed between the Sense block and the Action block you want to impact. In addition to the green Passive block, the simplest Think block is the red Inverse Think block. 12.
Put the red Inverse block between the Brightness Sense block and the Flashlight Action block. Remember the number flow story: every Sense block produces a number. The Brightness Sense block produces a big number when it senses a lot of light. It tells that big number to its neighbor (the Flashlight Action block), which turns the big number into a bright light. The Inverse Think block turns a big number into a small number (and a small number into a big number).
Swap out the Flashlight Action block and put a Drive Action block in its place. Now you’ve built a robot that goes when it’s dark, and stops when it’s light. The Inverse Think block in this Night-Gobot inverts the number from the Brightness Sense block before passing it to the Drive Action block. In low light, the Brightness Sense block produces a small number; the Inverse Think block inverts it to a big number, which makes the Drive Action block go fast.
14. Action Blocks Average Their Inputs If your robot has two Sense blocks and one Action block, which one controls the robot? Build a Testbot with two Distance Sense blocks and a Bar Graph Action block between them. The Bar Graph Action block shows a low value if neither Distance Sense block senses an object. Put one hand in front of each Distance Sense block. They will both produce a high number. The Bar Graph Action block shows a high number.
15. Gradients: Diffusion This robot shows the gradient story. The Bar Graph Action block is attached to one of two Passive blocks between two Distance Sense blocks, one at each end of the robot. The closer Distance Sense block has a bigger effect on the Bar Graph Action block. If your robot has an Action block right between two Sense blocks, the Action block averages the numbers the two Sense blocks tell it.
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).
Attach the Brightness Sense block to the Minimum Think block, and also attach a Knob Sense block. Now, if you turn the Knob Sense block all the way counterclockwise (left), then the Minimum Think block tells the Drive Action block, “zero”, because this is the smaller of the numbers it’s getting. If you turn the Knob Sense block all the way clockwise (right), then the Minimum Think block will tell the Drive Action block whatever number it’s getting from the Brightness Sense block.
Now add a Blocker block to the base (say, on the Battery). Then, on the other side of the Blocker block add a Speaker Action block, and, on top, put a Brightness Sense block with its sensor face pointing towards the rotating light. The Speaker Action block chirps (if the room is bright). To the right of the green Blocker block is a mini lighthouse: a Knob Sense block, a Rotate Action block and a Flashlight Action block. The Flashlight Action block spins when you turn up the Knob Sense block.
Construct a Testbot with a Battery, Bar Graph, and Distance Sensor. The closer an object is to the Distance Sensor, the higher the value displayed on the Bar Graph Cubelet. Now, place the Threshold Cubelet between the Distance Sensor and Bar Graph. Set the Threshold value to the lowest setting. You’ll notice that the Threshold Cubelet doesn’t seem to have any effect. That’s because we’ve set the Threshold value at a low number… so, any number above the Threshold value, 0, will pass on from block to block.
. Using the Bluetooth The Bluetooth Cubelet is a THINK block with special abilities. It has a Bluetooth radio inside that enables devices like a computer, tablet, or smartphone to communicate with Cubelets. Using the FREE Cubelets App you can control your robots with any iOS or Android device. With the release of Cubelets OS 4, Modular Robotics periodically releases firmware updates and new features via the Bluetooth Cubelet. http://www.modrobotics.com/cubelets/ bluetooth-getting-started/ http://www.