release();
OnRev(OUT_C);
Wait(TURNAROUND_TIME);
The main task configures Minerva's inputs and then calls retrieve() five times in a row. If everything works perfectly, which it probably won't, Minerva finds five dark objects and brings
them back to her starting point. In the next section, I'll explore some of the things that can confuse Minerva.
Try It Out!
To take Minerva out for a spin, I suggest using the back of the Test Pad that comes with RIS. It acts as a mostly uniform bright surface. Put the Test Pad on a hard, flat surface. Different surfaces
will give you different results. In particular, you may need to adjust the TURNAROUND_TIME constant to make Minerva spin around 180°. Scatter some black blocks on the back of the Test Pad
and start Minerva running. If you're lucky, she'll go pick up some blocks and bring them back to her starting point.
There are quite a few things that can go wrong:
1. Minerva may not ''see" the dark blocks to pick them up. I found that I got better results after the RCX was on for a minute or two—the sensor values depend on the battery power, which
stabilizes after the RCX is on for a while.
2. Minerva's wheels may stumble on the blocks, throwing her off course. Instead of driving and returning on a straight line, Minerva will now be pointing in a different direction. She probably
won't bring blocks back to her original starting point.
3. The grabber doesn't always pick up the block Minerva is aiming for.
Some of the challenges Minerva faces are discussed later in this chapter. First, I'm going to talk about Minerva's amazing mechanical features.
Directional Transmission
Minerva uses a single motor to drive forward and to turn. This mechanical magic is accomplished with the aid of a directional transmission. A directional transmission does different things
depending on whether you run a motor shaft forward or in reverse. Functionally, you can think of it as a box with an input shaft and two output shafts, as shown in Figure 5-2.
If you rotate the input shaft clockwise, one of the output shafts will rotate. If you rotate the input shaft counterclockwise, the other output shaft rotates.
There are at least two ways to build a directional transmission with the parts included in your RIS. The first design uses a pair of gears on a swinging arm. The second design uses a worm gear.
Minerva uses the worm gear design, but I'll briefly explain the fundamental ideas of both types of directional transmission.
Swing-Arm Design
A cutaway view of a swing-arm directional transmission is shown in Figure 5-3.
Figure 5-2.
A directional transmission will drive one of two output shafts
Page 107
Need help?
Do you have a question about the MINDSTORMS Robots and is the answer not in the manual?