LEGO MINDSTORMS Robots Скачать руководство пользователя страница 12

The big robot people believe that the robot should understand its environment and "think," more or less the same way that a human does. This is the traditional Artificial Intelligence (AI) approach 
to robotics. In this approach, the robot takes input from its sensors and tries to build a map of its surroundings. This process alone is very complicated: the robot might use a pair of video cameras 
or some more exotic sensors to examine its surroundings, while heavy-duty computers analyze all the sensor data and attempt to build a map. Finally, in a process called task planning, the robot 
tries to figure out how it will accomplish an objective—getting from one point to another, or picking up an object, or some other simple task. In this respect, again, the robot is expected to think 
like a human being. The heavy computing requirements of the AI approach consume a lot of power, which

Page 5

implies a bulky, heavy power supply. Hence, the robot can be pretty big—and expensive, too.

  

He Ain't Heavy, He's My Robot

A good example of the "big iron" approach to mobile robots is Ambler, developed by 
Carnegie Mellon University and the Jet Propulsion Laboratory. This behemoth stands about 
5m (16.4ft) tall, is up to 7m (23.0ft) wide, and weights 2500 kg (5512 lb). It moves at a 
blistering 35 cm (13.8 in) per minute. Just sitting still, it consumes 1400 W of power. Ask it 
to walk and it sucks up just about 4000 W. You can see a photograph of Ambler at 

http://

ranier.oact.hq.nasa.gov/telerobotics_page/Photos/Ambler.jpg.

Small Is Beautiful

Little robot people like to tease the big robot people for building tremendously large, tremendously expensive machines that don't have the dexterity of a six-month-old baby. The little robot 
people make small mobile robots based around inexpensive, off-the-shelf parts. They like to see themselves as mavericks, achieving decent results at a fraction of the cost and complexity of big 
robotics.

One of the interesting ideas behind small robot research is the idea that quantity might get the job done rather than quality. Instead of building a single bulky, complex robot to explore the surface 
of Mars, why not send a thousand robots the size of mice to do the same job? So what if a few of them fail? Small robots offer a new and innovative way to approach big problems.

The small robotics approach reduces the number of engineers you need in your basement. It makes robotics accessible to sophisticated hobbyists—people with technical knowledge and some extra 
time and money. If you take the small robot approach, you'll probably use standard batteries for power, which eliminates the need for a chemical engineer to design a power supply. Small robots 
are usually based on an existing, cheap microprocessor, which makes the electrical engineer's job a little easier. But you still need quite a bit of expertise:

• The electrical engineer still has to select sensors and actuators and wire them to the microprocessor. These parts are inexpensive and can be bought from hobby stores or electronics part stores.

• The computer programmer still needs a pretty low-level understanding of the microprocessor and the attached sensors and actuators.

• You still need a mechanical engineer to design the robot's body.

Page 6

The sophisticated hobbyist can do all of these things alone. But you have to be determined and have a lot of free time and money. There are a couple of ways to make things easier:

• You could buy a prebuilt robot brain. Some companies sell kits that are designed specifically to be used as robot brains. This approach saves you the trouble of selecting a microprocessor and 
getting it running, but you still have to select sensors and actuators and attach them to the brain somehow.

• You could use a modular construction kit to build the robot's body. LEGO

 bricks are one possibility—in fact, researchers and students at the Massachusetts Institute of Technology (MIT) have 

been using LEGO bricks for mechanical prototyping for over a decade.

An even better simplication, of course, is the MINDSTORMS

 Robotics Invention System itself.

What Is Mindstorms?

Содержание MINDSTORMS Robots

Страница 1: ... iv The Unofficial Guide to LEGO MINDSTORMS Robots by Jonathan B Knudsen Copyright 1999 O Reilly Associates Inc All rights reserved Printed in the United States of America Published by O Reilly Associates Inc 101 Morris Street Sebastopol CA 95472 Editor Mike Loukides Production Editor Nicole Arigo Printing History October 1999 First Edition ...

Страница 2: ...e property of their owners Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book and O Reilly Associates Inc was aware of a trademark claim the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book the publisher assumes no ...

Страница 3: ...39 Building Instructions 40 Some Tricky Programming 44 The Light Sensor 48 Idler Wheels 50 Using Two Light Sensors 50 Online Resources 52 Page viii 4 Not Quite C 53 A Quick Start 54 RCX Software Architecture 55 NQC Overview 58 Trusty Revisited 77 Online Resources 81 5 Minerva a Robot with an Arm 82 Building Instructions 83 ...

Страница 4: ...16 Replacement Firmware 116 pbFORTH Overview 117 About Forth 121 pbFORTH Words 126 An Expensive Thermometer 137 Minerva Revisited 138 Debugging 142 Online Resources 143 7 A Remote Control for Minerva 145 Two Heads Are Better Than One 145 The Allure of Telerobotics 146 Building Instructions 147 Programming the Remote Control 151 Programming Minerva 154 ...

Страница 5: ...elayed Gratification 163 Page ix Programs Tasks and Subroutines 164 Tips 165 Retrieving the Datalog 168 Online Resources 171 9 RoboTag a Game for Two Robots 173 Building Instructions 174 Subsumption Architecture 179 Online Resources 188 10 legOS 189 About legOS 189 Development Tools 190 Hello legOS 192 Function Reference 193 New Brains for Hank 204 Development Tips 211 ...

Страница 6: ...ut This Book For many of us plastic LEGO bricks are the best toy money can buy When I was five and broke my leg a little LEGO set was the high point of my six week convalescence I grew up building spaceships and planetary rovers wearing grooves in the ends of my fingernails from endlessly putting together and taking apart my creations In high school I shifted into the TECHNIC product line what cou...

Страница 7: ...Quite C introduces the Not Quite C NQC language NQC is an excellent environment for programming robots The chapter includes descriptions of NQC s functions as well as many examples Chapter 5 Minerva a Robot with an Arm contains another building project by far the most complex robot in the book You ll learn about directional transmissions and other neat stuff Chapter 6 pbFORTH discusses an innovati...

Страница 8: ... they are defined Internet addresses such as domain names and URLs Boldface is used for the names of buttons This is a note with information that supplements the text This is a warning with a cautionary message for the reader Request for Comments If you find typos inaccuracies or bugs please let us know You can reach O Reilly by mail telephone fax or email O Reilly Associates Inc 101 Morris Street...

Страница 9: ...ars in her eyes Daphne said Daddy s not working Daddy play LEGOs Someday I promise I ll let Daphne play with the whole set not just the bendy purple things And thanks to my sons Luke and Andrew just for being great guys You can build robots someday too if you wish The building instructions in this book were a special challenge I first sketched out the building instructions with photos from a digit...

Страница 10: ...ed a bevy of other options The most important ones are described in this book This chapter describes the basic concepts of robotics and creates a backdrop for the MINDSTORMS product line I ll also cover different approaches to programming mobile robotics Finally I ll describe the RIS set itself If you re in a hurry to start building something skip ahead to Chapter 2 Hank the Bumper Tank What Is a ...

Страница 11: ... it s not tethered you need to find a power supply that will run the robot for long enough to clean at least one room How does the robot know where it s been already How does the robot know where it is How does it know where to go next How does the robot navigate around obstacles like table legs and furniture How does the robot recognize things it shouldn t vacuum like money or toys or your cats Y...

Страница 12: ...ideas behind small robot research is the idea that quantity might get the job done rather than quality Instead of building a single bulky complex robot to explore the surface of Mars why not send a thousand robots the size of mice to do the same job So what if a few of them fail Small robots offer a new and innovative way to approach big problems The small robotics approach reduces the number of e...

Страница 13: ...er It also includes a power jack You can supply power in either polarity even AC from 9V to 12V The set includes more than 700 LEGO pieces that you can use to build the body of the robot You can write programs for the brain using an intuitivé highly visual programming environment on your PC Programs are sent to the RCX over an infrared IR data link The set includes an IR tower that attaches to one...

Страница 14: ... robot brain The RCX is a small computer with the following features outputs Three output ports labeled A B and C are located near the center of the brick The robot s actuators motors or lights can be attached to these ports inputs Three input ports labeled 1 2 and 3 are provided Various types of sensors can be attached to these ports to allow the RCX to find out about its environment ...

Страница 15: ...at you intend to run on another In this case you use your PC to write a program that will be run on the RCX As you ll see there are many ways to write programs for your RCX the official environment that comes with RIS is only one of them This book will introduce you to four powerful alternate programming environments program downloader Once you ve written a program for the RCX you need to know how...

Страница 16: ...r new toy When you re thirsty for more come back and read the rest of this book It will tell you everything you need to know to push your MINDSTORMS set as far as it can go Online Resources One of the most exciting things about MINDSTORMS is the online community that supports it On the one hand LEGO s official MINDSTORMS site provides some interesting information as well as a chance for RIS owners...

Страница 17: ...he MINDSTORMS online community LEGO MindStorms Gallery http member nifty ne jp mindstorms This Japanese web site maintained by someone named Joe includes photographs and descriptions of many many different robots including several flavors of walkers The text is mostly in Japanese but the pictures are fascinating even if you can t read the text Ben s Lego Creations http www pobox com benw lego Ben ...

Страница 18: ...oesn t want to vacuum the floor This page at Eureka describes the Eureka Robot Vac a kind of concept car in the world of vacuum cleaners Supposedly it will navigate through a room around obstacles and over electrical cords vacuuming as it goes My favorite part Switch on the robot vac and you ll hear a robotic tone What s a robotic tone Page 14 2 Hank the Bumper Tank In this chapter About the Build...

Страница 19: ...tures with a little bit of explanation here and there Each step shows you the parts you need as well as how they fit together There are however some names with which you should be familiar so that I don t end up describing everything as a doo hickey or a little gray thingy The parts you need to know are beams plates shafts gears bushings and wire bricks Page 15 Figure 2 1 Hank a friendly robot Bea...

Страница 20: ...pes of gears that come with the RIS kit There are two types of bushings in the RIS kit regular and half size Both fit on shafts and are used for securing a shaft in place or for spacing Figure 2 4 shows the bushings Page 16 Figure 2 3 Gears Figure 2 4 Full and half size bushings Finally the term wire brick refers to the part shown in Figure 2 5 This piece is used to make an electrical connection b...

Страница 21: ... Hank s treads will be mounted on these shafts The front pair do not rotate while the rear pair should Don t push the front pair all the way in you ll need to fit the tread wheel and another bushing on the end The parts included with RIS 1 5 are slightly different than those in RIS 1 0 If you re building Hank using RIS 1 5 you should use two bushings instead of the green pieces in Step 2 ...

Страница 22: ...Page 18 The back tread wheels are anchored to the shafts with the 16t gears ...

Страница 23: ...Page 19 Page 20 Next start building support for the drive motors ...

Страница 24: ...Page 21 Place the wire bricks on the motors then anchor them down with the yellow plates The wires themselves will fit into the grooves on the top of the motors ...

Страница 25: ...Page 22 Attach the motor wires to output A and output C Next build the platform for the front bumpers ...

Страница 26: ...Page 23 The touch sensors are attached only by the shaft that runs through them ...

Страница 27: ...Page 24 Hank s left bumper is next A light touch on the bumper pushes the touch sensor Hank s right bumper works exactly the same way ...

Страница 28: ...ical one side will push into the plate and the other side won t Page 25 Finish Hank by attaching the bumper touch sensors to input 1 and input 3 Slide the blue rubber bands onto the bumpers and anchor them to the bushings from the last step The rubber bands keep the bumpers from swinging forward ...

Страница 29: ...ogram works something like this go forward if I ve bumped into something back up turn away from the obstacle start over This program translates pretty simply into the RIS programming environment as shown in Figure 2 6 The program assumes that the two motors are attached to outputs A and C while the touch sensors should be attached to inputs 1 and 3 ...

Страница 30: ... around Hank may not run well on very thick carpet because there s not much space between the bottom of the body and the floor Once you ve got things running smoothly read on I ll describe Hank s most interesting features in the rest of this chapter Locomotion Hank gets around in the world on a pair of treads like a tank or a bulldozer This is just one approach to the general problem of locomotion...

Страница 31: ...s zero turning radius but without the slipping of the treads Page 28 Figure 2 7 Independent drive wheels Zero turning radius is nice in robots that measure how far each wheel travels You could do this using rotation sensors Once you know how far each wheel on a differential drive robot has traveled you can calculate with a fair degree of accuracy the location of the robot relative to its starting ...

Страница 32: ...wheel drive robots with enough parts Whichever system you choose this design does not have a zero turning radius You can t spin in place in your car The term turning radius comes from what happens when a car style robot drives in circles as shown in Figure 2 10 Figure 2 10 Turning radius of a car This type of design can be difficult to maneuver as you ll know if you ve ever tried to parallel park ...

Страница 33: ...ents for details The tri star wheel is another interesting idea Figure 2 12 shows a side view of a tri star robot and a close up of the wheel assembly Figure 2 12 Side view of the tri star design Page 31 Each wheel assembly is actually composed of three wheels arranged in a triangular fashion The robot drives these wheels to move When a large obstacle like a step is encountered the entire wheel as...

Страница 34: ... 32 3 You can use gears to transfer motion from one axis to another The gears in Hank s body transfer motion from the motors to the drive axles of the treads as shown in Figure 2 13 Figure 2 13 Using gears to transfer motion The Palette of LEGO Gears LEGO offers an impressive array of gears The LEGO community has adopted names for these gears which I will use throughout this book Refer back to Fig...

Страница 35: ...the two gears meet Therefore the torque on the shaft on the 24t gear is exactly three times the torque on the 8t gear s shaft Angular velocity is the measure of how fast a shaft rotates The angular velocity of a shaft can be expressed in terms of the velocity of a point on the gear as follows Here ω is the angular velocity v is the velocity of the point on the gear and r is the distance between th...

Страница 36: ...ably have to use gears to reduce its output speed micro motor This is a tiny motor with low speed and low power You probably can t use this motor to move your robot but it could be useful for lighter tasks It s harder to find than the other motors geared motor Two of these motors come with the MINDSTORMS RIS kit They are internally geared so that the output shaft has enough power to drive your rob...

Страница 37: ...S programming environment it hides some pretty messy details Hank s simple program demonstrates a powerful feature of the RCX software multitasking This is a term from the computer world it just means that the RCX can do more than one thing at a time Each of the two instruction sequences hanging off the touch sensor watchers is a separate task and they can actually execute at the same time To see ...

Страница 38: ...e they finish because the directions of the motors are always set explicitly The other solution is to structure your program differently If your sensor watchers don t have any delays built into them for example they will be much less likely to be interrupted Online Resources The Art of LEGO Design ftp cherupakha media mit edu pub people fredm artoflego pdf This is an outstanding paper about buildi...

Страница 39: ... call and order a catalog Make sure you get the LEGO DACTA catalog as Pitsco has an entirely different catalog that doesn t have anything to do with LEGO This is the place to order the Robolab software that allows you to program your RCX from a Macintosh Dacta Spares from Pitsco http www ee nmt edu jmathis dacta html This unofficial site contains images of some of the interesting pages in the Pits...

Страница 40: ...ther marks on it Trusty will follow the large black oval on this paper faithfully until he runs out of battery power Figure 3 1 Trusty a line follower As you can see in Figure 3 1 Trusty s main feature is a downward pointing light sensor This sensor is the key to line following The light sensor can distinguish between the white background of the Test Pad and the black line drawn on it As Page 40 y...

Страница 41: ...Page 41 ...

Страница 42: ...llows the idler wheel to rotate freely by putting the round side next to the plate If you put it on the other way the idler wheel will be locked in place Be sure to attach the wire bricks to the motors before putting them on Trusty Page 42 ...

Страница 43: ...Next build the support for the light sensor ...

Страница 44: ...Page 43 The 2u beams between the motors will hold the ends of the drive shafts Make sure that you can see the holes ...

Страница 45: ...while the light sensor is attached to input 2 Some Tricky Programming It s surprisingly hard to convince our robot to follow a black line on the floor A lot of things in mobile robotics are surprisingly hard as we discussed in Chapter 1 Robotics and MINDSTORMS The simplest way to describe the program is this ...

Страница 46: ...tay on the line Figure 3 2 Trusty zigzags along the black line With this in mind Trusty s algorithm can be more specific if I m on the line go straight forward if I m off the line turn back the opposite direction from the way I turned last time if I still don t find the line turn farther back the other direction Another way of looking at this is to say that Trusty now has two possible states 1 Jus...

Страница 47: ...f the sensor sees the white background then the program resets the timer and calls a subroutine called toggle This subroutine turns the robot left or right alternating each time it is called Figure 3 3 A top level view of Trusty s software Page 47 Use your own values for the thresholds of the light sensor watcher The values shown in Figure 3 3 are calibrated to my particular light sensor and may n...

Страница 48: ...he line and then observe the value Now see what values you get when Trusty is off the line You should also try the green area of the Test Pad and try all the measurements with the room both dark and light This should give you a good feel for the values that are important The View button only works if the input is configured to measure a light sensor To have the input configured correctly you ll ei...

Страница 49: ... from your kid brother s flashlight and anything else distracting The light level that s present in a certain place is called the ambient light In a robot like Trusty you might try surround the light sensor with dark bricks to block out the ambient light This can improve the accuracy of your sensor measurements In this particular case I didn t think it was necessary but you might like to give it a...

Страница 50: ... on his back twitching Using Two Light Sensors You can buy more light sensors for about 20US each see the Online Resources section at the end of this chapter By adding one more light sensor to Trusty we can simplify his program and make his movement along the black line smoother Adding the Sensor To add the second light sensor to Trusty just move over the one that s already there You can leave the...

Страница 51: ...usty with two light sensors Online Resources LEGO World Shop http www legoworldshop com The RIS kit itself is available at this online store although you can probably get it cheaper at a local retailer However the online store also carries items you won t find locally like extra motors touch sensors light sensors and even a remote control that sends messages to the RCX s IR port You can even buy a...

Страница 52: ...tines called My Commands you can t call one subroutine from another Likewise a subroutine can t call itself You can t control the RCX s display very well It would be really nice for debugging purposes to be able to show values on the display The LEGO Group aimed the Robotics Invention System at people who had never programmed before For this group RCX Code is a gentle way to get started with progr...

Страница 53: ...ple First you ll need to download and install NQC It s available for MacOS Linux and Windows Navigate to the NQC web site http www enteract com dbaum lego nqc and follow the instructions to download and install the latest version The examples in this book were written with the NQC version 2 0b1 Once it s installed enter the following program using a text editor This program operates Hank the robot...

Страница 54: ...lt use the S option Go ahead and run the program When you re done playing come back and get some background on the software that runs the RCX RCX Software Architecture Writing a program for the RCX involves a handful of software layers both on the development PC and on the RCX itself Figure 4 1 shows an overview of the important pieces Figure 4 1 RCX software architecture ROM The RCX is a small co...

Страница 55: ...mentary such as move this value to register 1 bytecode instructions are more powerful such as turn output 2 on with full power The firmware interprets the bytecode and performs the appropriate action About Spirit ocx On the PC side a piece of software called Spirit ocx handles interaction with the RCX via the IR link Spirit ocx can execute bytecode commands on the RCX download new programs to the ...

Страница 56: ...dows 95 98 and NT RCX Code by contrast only runs on Windows NQC was developed by Dave Baum who maintains the official web site at http www enteract com dbaum lego nqc His web site also includes pithy documentation for the language If you re using NQC on Windows you might want to also use RCX Command Center RcxCC RcxCC is a Windows application that wraps around NQC It provides a syntax colored prog...

Страница 57: ...direction of outputs with the following three commands Fwd const outputs Use this command to set the direction of the specified outputs to forward Rev const outputs This command sets the direction of the specified outputs to reverse Toggle const outputs To switch the direction of one or more outputs use this command To determine the output power use the following command SetPower const outputs exp...

Страница 58: ...e should be one of the constants OUT_ON OUT_OFF and OUT_FLOAT SetDirection const outputs const direction This command determines the direction of the supplied outputs The direction parameter should be OUT_FWD OUT_REV or OUT_TOGGLE OUT_TOGGLE is a special value that sets the direction of the output to the opposite of its current value In general I recommend you don t call SetDirection with the OUT_...

Страница 59: ...ion and are described in Table 4 1 SENSOR_1 SENSOR_2 and SENSOR_3 actually have a dual purpose in life Their first purpose is to identify the inputs on the RCX to commands like SetSensor Their second purpose is to retrieve values from the inputs Thus there are two distinct uses for SENSOR_1 SENSOR_2 and SENSOR_3 The SENSOR_PULSE and SENSOR_EDGE configurations are variations on SENSOR_TOUCH The SEN...

Страница 60: ...ask main SetSensor SENSOR_1 SENSOR_PULSE while true if SENSOR_1 4 PlaySound SOUND_DOWN ClearSensor SENSOR_1 The SetSensor command actually configures an input s type and mode at the same time The input type describes the electrical characteristics of the attached sensor while the mode determines how the sensor values are interpreted If you need finer control over the inputs than you can get from S...

Страница 61: ...o 1023 SENSOR_MODE_BOOL Either 1 or 0 SENSOR_MODE_EDGE Counts transitions from 1 to 0 and vice versa SENSOR_MODE_PULSE Counts transitions from 1 to 0 SENSOR_MODE_PERCENT Percent from 0 to 100 SENSOR_MODE_CELSIUS Celsius temperature SENSOR_MODE_FAHRENHEIT Fahrenheit temperature SENSOR_MODE_ROTATION Shaft angle 16 counts per full revolution Internally input values initially have a raw value from 0 t...

Страница 62: ...R_ROTATION SENSOR_TYPE_ROTATION SENSOR_MODE_ROTATION Timers The RCX has four internal timers numbered 0 1 2 and 3 They count in increments of 100 ms or once every 1 10 seconds NQC includes two commands for interacting with the timers Timer const n This returns the value of the specified timer which should be 0 1 2 or 3 The number returned is the number of 1 10 seconds since the timer was cleared C...

Страница 63: ...aits for a condition to become true until boolean condition statements Use this command to wait for the given condition to become true You could for example wait for the value of input 1 to become 4 like this until SENSOR_1 4 This particular until has an empty body which means it won t do anything each time the condition is tested it simply waits until the condition is true The following program b...

Страница 64: ...ondition is false the statements after the else are executed The following example turns different directions depending on the value of input 2 SetPower OUT_A OUT_C OUT_FULL if SENSOR_2 50 Fwd OUT_A Rev OUT_C else Rev OUT_A Fwd OUT_C On OUT_A OUT_C Page 67 Variables To use a variable you simply need to declare its name Only integer variables are supported Once a variable is declared you can assign...

Страница 65: ... things that might need to be adjusted throughout your program in one place Your program for example might have multiple places where it set the outputs to power level 5 Instead of explicitly putting 5 all the way through your program you can use the constant value POWER If you later decide you want the power level to be 7 you just have to change the definition of POWER instead of finding all the ...

Страница 66: ...t duration This command plays a note with the given frequency for the specified duration The frequency is in Hz so 440 is the pitch of the A above middle C on a piano The duration is in hundreths of a second You can only specify integer values for the frequency so don t expect the pitches to be exactly in tune No one expects your little robot to sound like Pavorotti If you want to play a sequence ...

Страница 67: ...ne 311 HALF PlayTone 370 GRACE PlayTone 330 HALF PlayTone 311 HALF Wait 2 HALF PlayTone 277 HALF PlayTone 330 HALF PlayTone 220 HALF PlayTone 220 2 BEAT Wait GRACE 5 HALF 2 BEAT HALF PlayTone 247 HALF PlayTone 277 HALF PlayTone 330 GRACE PlayTone 311 HALF PlayTone 277 HALF Wait 2 HALF PlayTone 247 HALF PlayTone 311 HALF PlayTone 208 HALF PlayTone 208 2 BEAT Wait GRACE 5 HALF 2 BEAT HALF IR Communi...

Страница 68: ... B 6 View Output C You can set the clock in the RCX using the following macro SetWatch const hours const minutes Use this macro to set the current time of the RCX s clock Unfortunately only constant values can be used The Datalog With the default firmware your RCX supports an interesting option called a datalog The datalog is simply a list of numbers You can create a new datalog and put numbers in...

Страница 69: ...59 62 65 68 71 75 C The datalog actually stores the source of every value If you use a tool like RCX Command Center it can show you the source of each value in the datalog In Chapter 8 Using Spirit ocx with Visual Basic I ll show you how to write your own program in Visual Basic to retrieve the contents of the datalog Tasks NQC gives you powerful control over tasks and subroutines Each of the RCX ...

Страница 70: ... 100 define SIXTH 12 define HALF 3 SIXTH define BEAT 2 HALF define GRACE 6 task sing PlayTone 330 2 BEAT Wait 2 BEAT 2 SIXTH PlayTone 115 SIXTH PlayTone 208 SIXTH PlayTone 247 SIXTH PlayTone 330 SIXTH PlayTone 311 2 BEAT Wait 4 SIXTH 2 BEAT 2 SIXTH PlayTone 115 SIXTH PlayTone 208 SIXTH PlayTone 247 SIXTH PlayTone 311 SIXTH PlayTone 277 3 BEAT Wait 4 SIXTH 3 BEAT HALF PlayTone 277 HALF PlayTone 311...

Страница 71: ... of commands that you will execute frequently Subroutines offer a way to clean up your source code and reduce the size of compiled programs Subroutines in NQC are defined in much the same way as tasks The following program has one subroutine called wiggle The main task shows how this subroutine is called task main wiggle Wait 200 wiggle sub wiggle OnFwd OUT_A OnRev OUT_C Wait 20 OnFwd OUT_C OnRev ...

Страница 72: ...A OnRev OUT_C Wait 20 OnFwd OUT_C OnRev OUT_A Wait 20 Off OUT_A OUT_C Inlines are called the same way as subroutines The compiler actually places the code of the inline wherever it is called almost like a macro or constant definition This actually makes inlines appear a little more capable than subroutines they can call other inlines or even subroutines In NQC version 2 0 for example you can defin...

Страница 73: ... variable or constant int power 6 forward power forward OUT_HALF But you can also do trickier stuff like this forward Message You can basically accomplish the same stuff with int parameters and const int parameters The advantage of const int is that no temporary variables are used Page 77 Trusty Revisited You ve seen some small examples of NQC code Now I ll show you how Trusty can be programmed us...

Страница 74: ...in to turn back the other way task lightWatcher while true if SENSOR_2 LIGHT2 toggle Wait TIMEOUT if SENSOR_2 LIGHT2 toggle Wait TIMEOUT 2 The toggle subroutine performs two important functions First it makes Trusty turn based on the value of the state variable Second it updates the value of state if it was RIGHT it will be LEFT and vice versa Page 78 Here is the whole program int state define LEF...

Страница 75: ... RCX Code was cumbersome The programming is a lot cleaner in NQC It s pretty straightforward to translate Table 3 1 into source code The basic strategy is to use a state variable to represent the four states of the robot represented by the four lines of Table 3 1 Then one task examines the sensors and updates the state variable Another task examines the state variable and sets the motors appropria...

Страница 76: ...he light sensor is on the line If it is the light sensor is seeing black define BOTH_ON 3 define LEFT_ON 1 Page 80 define RIGHT_ON 2 define BOTH_OFF 0 define INDETERMINATE 255 Thresholds for light and dark define DARK2 35 define LIGHT2 40 define DARK3 40 define LIGHT3 45 define POWER 4 task main initialize while true if state BOTH_ON OnFwd OUT_A OUT_C else if state LEFT_ON Off OUT_A OnFwd OUT_C el...

Страница 77: ...he RCX utilities for making your RCX play music and useful help files I highly recommend this application Lego Robot Pages NQC Tutorial http www cs uu nl people markov lego Mark Overmars creator of RcxCC the previous entry has written a detailed introduction to NQC It s available off his main web page as PDF Word97 PostScript or RTF This document is a gentle and thorough introduction to NQC Kevin ...

Страница 78: ... has the same wheel layout as Trusty Minerva s drivetrain is radically different In addition she has a simple arm with a grabber which allows her to pick up and drop small objects Best of all Minerva can be built with the pieces from the RIS alone The grabber arm is operated by a single motor The other motor powers the drivetrain which moves the robot forward or spins it in place Figure 5 1 shows ...

Страница 79: ... get it right And I don t mean I moved a few pieces around I actually disassembled and rebuilt the robot that many times The drivetrain alone took four tries before I got it right Directional Transmission and Drivetrain The long gray piece in Step 1 swivels freely on the shaft Minerva uses almost all of the gears that come with RIS 1 0 Unfortunately RIS 1 5 comes with fewer gears five 12t gears in...

Страница 80: ...Page 85 Make sure the bump on the long pin is up against the 4u beam ...

Страница 81: ...Before you put all of Step 7 together make sure the swiveling parts from Steps 1 and 2 are pointing up as shown Page 86 ...

Страница 82: ......

Страница 83: ...Page 87 Page 88 Step 11 is tricky You ll need to slide the 8u shaft into the structure adding bushings and gears as you go The swiveling pieces from Steps 1 and 2 are now anchored ...

Страница 84: ...Page 89 ...

Страница 85: ...Step 14 is similar to Step 11 take a deep breath and go slowly ...

Страница 86: ...Page 90 Grabber Arm In Step 17 the half bushings go between the center block and the cams pear shaped pieces ...

Страница 87: ...Page 91 ...

Страница 88: ...Page 92 Make sure that the two sides are at the same angle They should mirror each other ...

Страница 89: ...Page 93 Page 94 ...

Страница 90: ...Structural Support Page 95 ...

Страница 91: ...Idler Wheel Page 96 ...

Страница 92: ...Page 97 Drive Motor ...

Страница 93: ...While you re putting the motor in hold on to the worm gear so it doesn t slip off Page 98 ...

Страница 94: ...Grabber Arm Motor ...

Страница 95: ...Page 99 ...

Страница 96: ...Page 100 RCX Attach the RCX on both sides as shown Page 101 ...

Страница 97: ...Wiring First attach the left motor which powers the arm to output A Then use a wire brick to attach the right motor the drive motor to output C ...

Страница 98: ...he light sensor to the front of the arm The wire attaches to Minerva s side as shown Next use a wire brick to attach the touch sensor to the light sensor wire Then use a longer wire brick to attach both wires to input 3 ...

Страница 99: ...rive back to the starting point drop whatever s in the grabber I ve written Minerva s program in NQC see Chapter 4 Not Quite C You could create a program in RCX Code the environment that comes with RIS but you wouldn t be able to implement some key features In particular Minerva s ability to drive back just as far as she drove forward is crucial There s no way to do this in RCX Code Minerva s prog...

Страница 100: ...T_A until SENSOR_3 100 Off OUT_A void release Run the motor until we hit the limit switch OnRev OUT_A until SENSOR_3 100 Back off from the switch OnFwd OUT_A until SENSOR_3 100 Off OUT_A int returnTime sub retrieve Drive forward until we see something OnFwd OUT_C ClearTimer 0 until SENSOR_3 threshold 3 Wait 20 Move up on it a little returnTime Timer 0 Off OUT_C grab Turn around roughly OnRev OUT_C...

Страница 101: ...sor value is a little less than the original average until SENSOR_3 threshold 3 Calibrating the sensor in this way frees us from hard coding a light sensor threshold value into Minerva s program It also makes Minerva better able to deal with different lighting conditions The retrieve subroutine is the heart of Minerva s program It drives forward by turning output C on until it finds something dark...

Страница 102: ... 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 Page 107 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 ...

Страница 103: ... swing arm directional transmission Worm Gear Design Minerva s drivetrain is based on a worm gear directional transmission The basic design of the worm gear directional transmission is quite simple A cutaway view is shown in Figure 5 4 Figure 5 4 Cutaway view of a worm gear directional transmission The input shaft drives the worm gear which slides freely along the shaft In fact it s easier for the...

Страница 104: ...ing gears to transmit motion from one shaft to another By using pulleys of different sizes you can achieve the same power and speed tradeoffs as with gears The only difference is that pulleys connected by a band turn in the same direction while two gears meshed together turn in opposite directions If you twist the band around once you can get the pulleys to move in opposite directions just as with...

Страница 105: ...direction and the arm lowers the grabber relaxes and the arm rises once again This mechanical sorcery is based on the FetchBot created by Ben Williamson see the Online Resources section for details A cutaway view of the arm is shown in Figure 5 7 The entire arm is controlled by the main drive shaft A motor linked to a worm gear drives the 40t gear on the main drive shaft Page 111 Figure 5 7 Cutawa...

Страница 106: ...he three input barrier attaching more than one sensor to a single input Minerva for example has a touch sensor and a light sensor attached to a single input If you have ambitious plans and parts for expanding Minerva you ve got two inputs not just one with which to play There are two common variations on the theme of attaching multiple sensors to one input both of which are discussed here Multiple...

Страница 107: ...Minerva was relative to her starting position You wouldn t have to worry about the directional transmission any more Wheels do slip sadly so unexpected terrain like driving over blocks would likely throw this method of navigation off as well Still it s a step up from timing Navigation Tools There are several generic navigation tools that you might consider attaching to your RCX to answer the quest...

Страница 108: ...gotten good reviews from the MINDSTORMS online community Page 116 6 pbFORTH In this chapter Replacement Firmware pbFORTH Overview About Forth pbFORTH Words An Expensive Thermometer Minerva Revisited Debugging Online Resources In Chapter 4 Not Quite C I described how NQC allows you to get around many of the limitations of RCX Code the programming environment that comes with RIS Even NQC however has...

Страница 109: ...other simple software that talks to the RCX s IR port You can interact with pbFORTH from a Windows terminal emulator a Java application running on Linux or even a custom developed application on a PalmPilot development cycle A development cycle is the sequence of steps you need to follow to write and run a program With pbFORTH this sequence of steps is farily short Basically you upload or type you...

Страница 110: ...ow to transmit firmware over the IR link to the RCX Two freely available firmware downloaders are nqc described in Chapter 4 and firmdl available in C source code at http graphics stanford edu kekoa rcx tools html Downloading firmware to the RCX takes a couple of minutes so be prepared to wait To download pbFORTH using nqc for example you use the firmware option like this nqc firmware pbforth srec...

Страница 111: ...ettings you will see the letters you type two or three times in a row like this 77 22 00 MMOOTTOORR__SSEETT I have removed the extra letters in the examples in this chapter for clarity To minimize the repeated characters as you type in the examples make sure local echo is disabled in your terminal emulator The MOTOR_SET line turns on output A represented in the code by 0 in reverse represented by ...

Страница 112: ...ORTH s RCX specific words and present some short examples of robotic programming with pbFORTH The Stack Forth is a simple but powerful language It is based around the idea of a stack A stack is just what it sounds like like a stack of trays in one of those spring loaded carts at a cafeteria You can add something to the stack or remove the top item Adding an item to the stack is a push Retrieving t...

Страница 113: ... Forth The table shows the stack before Initial Stack and after Ending Stack the word runs By convention the top is shown on the right For example x1 x2 shows a stack with x2 at the top and x1 as the second item This seems confusing at first but it makes sense after a while and it s the convention in Forth documentation Table 6 2 Forth Built in Words Word Meaning Initial Stack Ending Stack DUP Dup...

Страница 114: ...rth to convert numbers between different bases HEX 20 DECIMAL 20 in base 16 is 32 in base 10 32 ok 8 BASE 20 DECIMAL 20 in base 8 is 16 in base 10 16 ok The open parenthesis is used to indicate a comment The pbFORTH interpreter simply ignores the rest of the line after it sees the Defining words Writing programs in Forth is a matter of defining your own words in the dictionary Word definitions beg...

Страница 115: ...n use the word CONSTANT and supply a name like this 7 CONSTANT FULL ok You can the use FULL anywhere you really mean 7 like this FULL 2 0 MOTOR_SET ok Variables are even easier to define Just use the word VARIABLE and supply a name VARIABLE z ok Values are stored in variables using the word pronounced store 12 z ok The value of a variable can be retrieved and placed on the stack with the word z 12...

Страница 116: ...ue if it is less than zero false otherwise 0 Replaces the top item of the stack with true if it is equal to zero false otherwise The following example prints out a message if the top item on the stack is less than 0 negative 0 IF less than zero THEN ok 2 negative less than zero ok 2 negative ok The 0 word examines the top value on the stack The result of this comparison is examined by the IF word ...

Страница 117: ... which retrieves the current state of the buttons into the RCX_BUTTON variable Then the value of RCX_BUTTON is retrieved with and compared to 2 which corresponds to the View button on the RCX When this condition is true the loop ends and WaitForViewButton is done BEGIN body AGAIN This variation on BEGIN UNTIL loops forever executing its body each time through the loop pbFORTH Words pbFORTH include...

Страница 118: ...ns an output on or off It pops three parameters off the stack The power parameter should be 1 to 7 where 7 is full power The mode parameter indicates whether the output should be turned on going forward 1 or in reverse 2 or if it should be turned off in brake 3 or float 4 modes In brake mode the motor shaft resists turning in float mode it turns freely The top parameter index should be 0 1 or 2 re...

Страница 119: ...ton is pressed isRunButtonPressed buttonState 1 AND Remember you have to call BUTTON_INIT before you use this word otherwise is won t work To test the state of the On Off button you ll need to use the POWER_GET word described later in this chapter LCD Display Words pbFORTH provides direct control of the RCX s display This is exciting news because you can display the results of your programs or eve...

Страница 120: ...e 6 6 Table 6 5 Values for the decimal Parameter of LCD_NUMBER Value in hexadecimal Description 3002 No decimal point 3003 One digit after the decimal point 3004 Two digits after the decimal point 3005 Three digits after the decimal point any value Single digit on the right of the display use 3017 for signed Table 6 6 Values for the signed Parameter of LCD_NUMBER Value in hexadecimal Description 3...

Страница 121: ...ond quarter lights up Do this three more times and the third quarter lights up the fourth quarter lights up and then all the quarters go blank and the sequence begins again Table 6 7 LCD Segment Numbers Segment Number hexadecimal Sequence Description 3006 no Standing figure 3007 no Walking figure 3008 no Input 1 selected 3009 no Input 1 active 300A no Input 2 selected 300B no Input 2 active 300C n...

Страница 122: ...es pbFORTH s input system Call it once before working with inputs Configuring inputs You probably remember that the RCX s inputs may be powered The light sensor for example is powered from an input These types of sensors are called active all others are passive In pbFORTH the following words determine whether an input is active or passive SENSOR_ACTIVE index SENSOR_PASSIVE index These words set th...

Страница 123: ...ut s mode determines how the sensor values will be interpreted The modes are shown in Table 6 9 Table 6 9 Input Mode Values Value hexadecimal Description 0 Raw sensor value from 0 to 1023 20 Boolean either 1 or 0 40 Counts transitions from 1 to 0 and vice versa edge counting 60 Counts transitions from 1 to 0 pulse counting 80 Percent from 0 to 100 A0 Celsius temperature C0 Fahrenheit temperature E...

Страница 124: ... value This word returns the current value of the given input as a Forth style boolean For example to read the value of the sensor on input 3 you would do this read 2 SENSOR_READ 2 SENSOR_VALUE Strictly speaking of course you should really check the return code from SENSOR_READ to make sure it was successful Finally the current value of an input can be reset with the following word SENSOR_CLEAR in...

Страница 125: ...hould probably do this if you re going to stop using pbFORTH for a while say overnight POWER_GET address code This word serves two purposes depending on the value of code The result is placed in the variable represented by address pbFORTH provides the RCX_POWER variable for use with this word The possibilities are shown in Table 6 10 Table 6 10 POWER_GET Code and Value Possibilities Code hexadecim...

Страница 126: ...sk interrupting each task to give control to the next task Cooperative multitasking is a little tricky to program because each task needs to explicitly yield control to the other tasks If your robot has a task that is going to do any lengthy processing the task needs to be structured so that it can yield control frequently The pbFORTH web page has more information on cooperative multitasking Take ...

Страница 127: ...ecute a defined word just one time Because it doesn t have a name you can t execute the defined word again later The tortast txt example sets up its other three tasks in the same way NONAME TIMER_TASK ACTIVATE BEGIN UPDATE_TIMERS PAUSE AGAIN EXECUTE NONAME SENSOR_TASK ACTIVATE BEGIN UPDATE_SENSORS PAUSE AGAIN EXECUTE NONAME DISPLAY_TASK ACTIVATE BEGIN UPDATE_DISPLAY PAUSE AGAIN EXECUTE 4 To actual...

Страница 128: ...ENSOR_READ to return 0 indicating success Then the actual input value is read using SENSOR_VALUE A call to showTemperature puts the input value on the display Each time through the loop we call isRunButtonPressed if the button is pressed we fall out of the loop A call to clear cleans up the display and then thermometer is done If you bought LEGO s temperature sensor you now have yourself a 225 dig...

Страница 129: ...p LOOP NUMBER_OF_SAMPLES threshold threshold showValue forward 7 1 2 MOTOR_SET spin 7 2 2 MOTOR_SET stop 7 3 2 MOTOR_SET armGrab 7 1 0 MOTOR_SET armRelease 7 2 0 MOTOR_SET armStop 7 3 0 MOTOR_SET grab armGrab BEGIN 2 sensorValue 100 UNTIL armRelease BEGIN 2 sensorValue 100 UNTIL armStop release armRelease BEGIN 2 sensorValue 100 UNTIL armGrab BEGIN 2 sensorValue 100 UNTIL armStop turnAround spin T...

Страница 130: ... the end and returning to the beginning The main program word Minerva pretty much describes itself It initializes the RCX which includes configuring input 3 as a light sensor input Then it calls calibrate to take an average reading of the light sensor Finally it loops five times calling retrieve to go pick up something and bring it back The retrieve word is also pretty self explanatory It calls se...

Страница 131: ...ng point in returnTime we just need to drive back for the stored amount of time return forward returnTime sleep stop Another interesting word is calibrate which takes ten readings of the light sensor and calculates an average value This value is used to determine if the light sensor sees something that can be picked up or not We begin by pushing the current running total on to the stack To begin w...

Страница 132: ...ively test every word in your program This makes it easy to drill down from the higher layers to the lower layers of your program to identify problems Any word that is defined can be interactively tested This is powerful medicine indeed 2 On the other hand you need to be very careful about endless loops If you do get stuck executing an endless loop there s no way to stop pbFORTH short of removing ...

Страница 133: ...ORTH The tools are based on Tcl Tk Forth Interest Group Home Page http www forth org This site is a good jumping off point for all sorts of interesting information about the Forth language If you want to learn more about Forth this is a great place to start Tim Hendtlass s Real Time Forth Book ftp ftp taygeta com pub Forth Literature rtfv5 pdf This is one of the resources available from the Forth ...

Страница 134: ...va also needs a new program that will respond to incoming IR messages Two Heads Are Better Than One If you re a MINDSTORMS enthusiast you re probably always hoping to get more stuff more motors more sensors and a better programming environment than RCX Code A second RIS set is a great investment if you can afford it or if you can convince somebody to buy it for you If you re on a tighter budget yo...

Страница 135: ...nd of cheating Part of the point of autonomous mobile robots is that you can set them running and forget about them until they re done with whatever they re doing If you build a robotic vacuum cleaner you want to set it running and forget about it until it s done cleaning your floors If you used a teleoperated robotic vacuum cleaner you d spend just as much time cleaning as with a conventional vac...

Страница 136: ...sor goes on input 1 while the two wire bricks which will be attached to the touch sensors go to input 2 and input 3 If you get these two wires backwards you ll know when you push the joystick backward and the robot moves forward You can easily swap the two connectors later ...

Страница 137: ...The two touch sensors are triggered by a joystick like lever contraption Only one of the sensors will ever be triggered at a time Page 149 The next step shows the joystick which is really a simple lever ...

Страница 138: ...n the remote assembly When you wiggle the joystick back and forth it pushes one or the other touch sensor Step 8 might not look like much but it s important It s the slider that controls Minerva s arm It slides past the light sensor presenting either a yellow or a black brick to the sensor This is how the RCX knows if you ve moved the slider ...

Страница 139: ...do much It responds to its sensors by sending commands to Minerva The joystick control triggers the two touch sensors the remote responds to these by telling Minerva to move forward or spin The slider control is used to move Minerva s arm up or down One final feature is a heartbeat a special message that the remote periodically sends to Minerva If Minerva doesn t hear this message it knows it has ...

Страница 140: ...eartbeat task touchWatcher while true if SENSOR_2 1 SendMessage FORWARD_MESSAGE Wait 10 until SENSOR_2 0 SendMessage STOP_MESSAGE if SENSOR_3 1 SendMessage SPIN_MESSAGE Wait 10 until SENSOR_3 0 SendMessage STOP_MESSAGE define TOLERANCE 3 int current int minimum int maximum int midline int lastArmMessage task lightWatcher minimum 100 maximum 0 while true current SENSOR_1 if current minimum minimum ...

Страница 141: ...rs while you re pressing or releasing the switch between the steady states of off and on Bounce can be eliminated with an electronic circuit or by special programming as I ve done here The call to Wait 10 gives the touch sensor signal a chance to settle down before touchWatcher starts looking for the release of the touch sensor The slider on the remote changes the value of the light sensor lightWa...

Страница 142: ...ken grab and release The grab and release tasks are kicked off by messageWatcher to control Minerva s arm They are separate tasks so that messageWatcher can continue to receive commands from the remote while the arm is moving You could for example start driving forward while the arm was grabbing grab and release have the ability to interrupt each other so you can change the direction of the arm as...

Страница 143: ...SAGE start grab ClearMessage else if message RELEASE_MESSAGE start release ClearMessage else if message HEARTBEAT_MESSAGE missedBeats missedBeats 1 ClearMessage task grab until armLock 0 Page 156 stop release OnFwd OUT_A until SENSOR_3 100 armLock 1 OnRev OUT_A until SENSOR_3 100 armLock 0 Off OUT_A task release until armLock 0 stop grab OnRev OUT_A until SENSOR_3 100 armLock 1 OnFwd OUT_A until S...

Страница 144: ...t being interrupted Both grab and release wait for armLock to be 0 before interrupting the other task like this until armLock 0 The grab and release tasks set armLock to 1 before doing the sensitive press release cycle This means Minerva should never break her own arm Stayin Alive The heartbeatWatcher task also deserves some mention It adds one to the missedBeats variable just as often as it expec...

Страница 145: ...rg program1 html The Thames Science Center in Newport Rhode Island hosts monthly challenges for robot builders of all ages Each challenge consists of an objective to participate you build a robot to accomplish the objective Then bring in your robot and see how it compares to other designs You can register online FIRST LEGO LEAGUE http www legomindstorms com first FIRST LEGO LEAGUE FLL is an organi...

Страница 146: ...sing Visual Basic VB Visual Basic is a language developed by Microsoft and included with many of their other products The link between Visual Basic and your robots is a file called Spirit ocx which is installed as part of the standard RIS software In this chapter I ll show you how to use Visual Basic and Spirit ocx to control and program your robots If you are running windows chances are good that...

Страница 147: ...t ocx is the glue that links Windows applications to the RCX If you installed the software from the RIS kit you already have Spirit ocx on your computer In essence Spirit ocx is a collection of functions that send commands to the RCX ask the RCX for information or create programs on the RCX Figure 8 1 shows the software architecture which is quite similar to Figure 4 1 in Chapter 4 Spirit ocx can ...

Страница 148: ...f has a default name of Spiritil which is just fine for our purposes The Spirit Control item appears in the list only if you have already installed the LEGO MINDSTORMS software During this installation Spirit ocx is registered with the system in such a way that VB or VBA can find it later Page 162 Figure 8 2 Spirit ocx in the tool palette You should glance over Spiritl s properties to make sure th...

Страница 149: ...add it to a program that will be executed later The following subroutine plays a little song using the PlayTone function in its immediate mode Sub Charge With DummySpiritForm Spirit1 InitComm PlayTone 392 10 PlayTone 523 10 PlayTone 659 10 PlayTone 784 20 PlayTone 659 10 PlayTone 784 20 CloseComm End With End Sub Instead of executing things on the RCX immediately you can store them for later The f...

Страница 150: ...up of one to ten tasks and zero to eight subroutines This structure is dictated by the RCX firmware and hence is exactly the same structure that I described for NQC in Chapter 4 Subroutines are defined much the same way that tasks are defined by framing some set of function calls with the BeginOfSub and EndOfSub functions The same restrictions on subroutines in NQC apply here subroutines cannot ca...

Страница 151: ...outputs and the last value received over the IR port Page 166 Poll accepts a Source and a Number that taken together describe the value you want to retrieve The key to understanding Poll is the Parameter Table in the Technical Reference Document This table simply lists out the possible values for Source and Number and how they are interpreted For example a call to Poll 9 1 would return the value o...

Страница 152: ...epresented by the first 9 2 the constant value 100 is represented by 2 100 What s that 1 in the middle That s the operator that s used for comparison The available operators are shown in Table 8 1 As you might have guessed you can define constants to make these easier to understand Table 8 1 Operators for If and While Number Meaning 0 1 2 3 not equal A good set of constants makes the If statement ...

Страница 153: ...mplished its mission to conserve battery power You can also use Spirit ocx to query the RCX for the current battery charge The PBBattery function returns the current battery voltage in milliVolts mV For fresh batteries you should get a reading of 9000 The following example shows how you can retrieve and display the current battery power level Sub ShowBattery With DummySpiritForm Spirit1 InitComm b...

Страница 154: ...ve string before writing it out to the file The output file will look something like this depending of course on the contents of the datalog Variable 1 2 Timer 0 543 Variable 2 8 Variable 8 368 Sensor value 1 33 Watch 0 7 A plain text file of comma separated values is usually pretty easy to import into a spreadsheet or statistical analysis program You can use your robot to gather data use this exa...

Страница 155: ...Val code As Integer As String getTypeString Switch _ code 0 Variable _ code 1 Timer _ code 2 Constant _ code 3 Motor status _ code 4 Random _ code 8 Program number _ code 9 Sensor value _ code 10 Sensor type _ code 11 Sensor mode _ code 12 Sensor raw _ Page 171 code 13 Sensor boolean _ code 14 Watch _ code 15 IR message _ End Function This example of course is really just a jumping off point You m...

Страница 156: ... need Dolphin Smalltalk which is a Smalltalk implementation for Windows Links are provide on the Bot Kit web site for obtaining Dolphin Page 172 Smalltalk which is available for free Bot Kit itself is free although you ll need to join a related mailing list in order to install the software As with VB you can write Smalltalk programs that run on your PC and control the RCX or you can write Smalltal...

Страница 157: ...ensor sees the edge the robot backs up and turns to stay inside the arena When the bumper is triggered the robot assumes it bumped into the other robot and shouts Tag It waits for an acknowledgement from the other robot in the form of another IR message If the acknowledgment is received the robot adds one to its current score When one of the robots receives the Tag message from the other robot it ...

Страница 158: ......

Страница 159: ...Page 175 The 16t gears are nestled inside the tread wheels ...

Страница 160: ...Page 176 ...

Страница 161: ...Page 177 Attach the motors to output A and output C as shown Page 178 ...

Страница 162: ...The light sensor which is mounted on the bumper is attached to input 2 The touch sensor goes on input 1 Page 179 ...

Страница 163: ...e robot subsuming replacing lower level behaviors As you ll see subsumption architecture is simple enough to be implemented on inexpensive hardware including the RCX A basic example will clarify the concept Imagine a robot that has a bumper a touch sensor on its front When the robot bumps into something it should back up and turn around With subsumption architecture the robot will use two behavior...

Страница 164: ... collides with the other robot the bumper is pressed This causes the tag behavior to take control of the robot If the robot drives over the edge of the playing field the reading from the light sensor causes the avoid behavior to assert itself Finally the top level behavior is tagged This behavior is triggered if the robot has been tagged by the other robot Page 181 Figure 9 3 RoboTag behaviors I l...

Страница 165: ...lue COMMAND_NONE which indicates that tag is not interested in controlling the robot When the bumper is pressed tag sends out an IR message using SendMessage to the other robot Then it waits for a reply by repeatedly calling Message The robot also backs up and turns to the left or right to move around the robot it has just tagged This movement is accomplished by setting the tagCommand variable If ...

Страница 166: ...avior backs up and turns to move away from the edge much like tag int avoidCommand task avoid while true if LIGHT_SENSOR averageLight 3 Back away from the border avoidCommand COMMAND_FLOAT Wait 20 avoidCommand COMMAND_REVERSE Wait 50 Turn left or right for a random duration if Random 1 0 avoidCommand COMMAND_LEFT else avoidCommand COMMAND_RIGHT Wait Random 200 avoidCommand COMMAND_NONE The highest...

Страница 167: ...fore This isn t an issue since cruiseCommand is always COMMAND_FORWARD However in a different program you might want to set motorCommand to a default action at the beginning of the while loop in arbitrate Where the rubber meets the road The arbitrate task hands off the actual dirty work of controlling the motors to a subroutine called motorControl All motorControl has to do is examine the value of...

Страница 168: ...havior tasks and of course arbitrate It also uses the light sensor initialization code from Minerva see Chapter 5 Minerva a Robot with an Arm to calculate a baseline value for the light sensor When the light sensor reads lower than the average the RoboTag robot can assume it s reached the edge of the arena Here is the entire code for RoboTag You should download this program to both of the robots t...

Страница 169: ...om duration if Random 1 0 tagCommand COMMAND_LEFT else tagCommand COMMAND_RIGHT Wait Random 200 tagCommand COMMAND_NONE else tagCommand COMMAND_NONE int avoidCommand task avoid while true if LIGHT_SENSOR averageLight 3 Back away from the border avoidCommand COMMAND_FLOAT Wait 20 avoidCommand COMMAND_REVERSE Wait 50 Turn left or right for a random duration if Random 1 0 avoidCommand COMMAND_LEFT el...

Страница 170: ...ggedCommand motorControl sub motorControl if motorCommand COMMAND_FORWARD OnFwd OUT_A OUT_C else if motorCommand COMMAND_REVERSE OnRev OUT_A OUT_C else if motorCommand COMMAND_LEFT OnRev OUT_A OnFwd OUT_C else if motorCommand COMMAND_RIGHT OnFwd OUT_A OnRev OUT_C else if motorCommand COMMAND_STOP Off OUT_A OUT_C else if motorCommand COMMAND_FLOAT Float OUT_A OUT_C task main initialize cruiseComman...

Страница 171: ...NSOR Wait 10 i 1 averageLight runningTotal NUMBER_OF_SAMPLES Online Resources mattdm s Mindstorms stuff http www mattdm org mindstorms This is the original RoboTag web page created by Matthew Miller It contains the original source code and a couple of movies of RoboTag in action Brooks Subsumption Architecture http ai eecs umich edu cogarch3 Brooks Brooks html This page has some background on subs...

Страница 172: ... publications If you don t already know C you might want to work your way through a tutorial before reading this chapter About legOS legOS is replacement firmware that completely replaces the default RCX firmware that LEGO gives you Like pbFORTH it offers full control of the RCX If you re already familiar with C you may be more comfortable running legOS than pbFORTH For updated information on legO...

Страница 173: ...hapter for information on obtaining egcs and binutils Cygwin What if you re not running Linux or a Unix like operating system If you have Windows instead there is a way to make Windows act like Linux The Cygwin package from Cygnus Solutions is a port of many GNU tools to Windows 95 98 and NT Like lots of GNU stuff it s a little bulky A full download is about 13 MB compressed If you re a Linux enth...

Страница 174: ... based legOS compilers All you do is submit your source code Across the Internet a machine compiles the code and sends you the result which you can then download to your RCX This completely sidesteps the whole problem of obtaining a cross compiler This solution is useful even for platforms that don t support the GNU tools As long as you have a web browser you can compile legOS programs The web bas...

Страница 175: ...the On Off button to switch the RCX off and on When the RCX is on you can press Run again to see the Hello message again Show your friends and family they will be awed and inspired Function Reference Once you ve seen one RCX development environment you ve seen them all to some degree at least If you ve been reading through this book in order you ve probably noticed that NQC and pbFORTH have simila...

Страница 176: ...int between the first two and last two digits lcd_digit d Use this macro to display a single digit on the right side of the display The RCX s display contains many symbols as well indicators for the outputs inputs datalog battery level download status and others Each display segment can be controlled individually void lcd_show lcd_segment segment Show a single display segment with this function Th...

Страница 177: ...m 0 to 255 You can use the handy constants MIN_SPEED and MAX_SPEED if you wish To set outputs A and C running forward at top speed do this motor_a_dir fwd motor_c_dir fwd motor_a_speed MAX_SPEED motor_c_speed MAX_SPEED Working with Inputs direct sensor h In legOS support for inputs is rudimentary Remember all that nice input value processing in NQC and pbFORTH In legOS you have to deal with the ra...

Страница 178: ... macros process raw input values to produce a light sensor reading in the range from 0 to approximately LIGHT_MAX legOS also supports rotation sensors with the following functions void ds_rotation_on unsigned const sensor void ds_rotation_off unsigned const sensor These functions turn on or off rotation counting for the specified input void ds_rotation_set unsigned const sensor int pos This functi...

Страница 179: ...e as the state parameter and the name of a button for button Buttons names are BUTTON_ONOFF BUTTON_RUN BUTTON_VIEW and BUTTON_PROGRAM For example the following code tests the state of the View button if PRESSED button_state BUTTON_VIEW View button is pressed To test the state of more than one button it makes sense to store the result of button_state like this int state state button_state if PRESSE...

Страница 180: ... above all you have to do is pass the name of a function You can pass information to the task using the argc and argv parameters The new task has the given priority and stack size Lower priorities take precedence over higher priorities In general you can pass 0 for the priority and DEFAULT_STACK_SIZE as the stack size This function returns a process identification number PID You can stop a task as...

Страница 181: ...ay_task and stop_task The process ID of the display task is saved away in the pid variable so that it can be stopped later The last thing main does is call tm_start to start the task manager which actually handles running the tasks The stop_task waits for the Run button to be pressed When the button is pressed stop_task calls kill to stop the display process What s that call to msleep at the begin...

Страница 182: ...n h include unistd h include sys tm h pid_t pid int display_task int argc char argv while 1 cputs Hello lcd_refresh sleep 1 cputs nurse lcd_refresh Page 202 sleep 1 return 0 wakeup_t button_press_wakeup wakeup_t data return PRESSED button_state data int stop_task int argc char argv msleep 200 wait_event button_press_wakeup BUTTON_RUN kill pid return 0 int main pid execi display_task 0 NULL 0 DEFAU...

Страница 183: ... built in system sounds with the following function void sound_system unsigned nr This function plays one of the system sounds of the RCX The nr parameter describes the sound it can be any of the values shown in Table 10 1 Table 10 1 sound_system Sound Numbers Sound Number Description 0 Short beep 1 Two medium beeps 2 Descending arpeggio 3 Ascending arpeggio 4 Long low note 5 Quick ascending arpeg...

Страница 184: ...owing away legOS and your program This is really only useful if you want to load some new firmware on the RCX Use with care New Brains for Hank In this section I ll present a longer example program It s a program for a slightly modified version of Hank the robot from Chapter 2 Hank the Bumper Tank All you need to do is mount the light sensor on the front of Hank and attach it to input 2 This light...

Страница 185: ...an concentrate solely on light seeking behavior in seek_enlightenment The obstacle avoidance behavior is already programmed in a different behavior and will subsume the light seeking behavior as necessary Without further ado here s the entire program LightSeeker c include conio h include direct button h include direct motor h include direct sensor h include unistd h include sys tm h define MAX_TAS...

Страница 186: ...TIME avoid_command COMMAND_LEFT msleep TURN_TIME avoid_command COMMAND_NONE return 0 define RAW_DARK 0x7c00 define RAW_LIGHT 0x6000 int process_light int raw long big 100 long raw RAW_LIGHT long percent big RAW_DARK RAW_LIGHT return 100 int percent int seek_command define FUDGE 5 int wait_for_better int baseline unsigned long milliseconds int current int saved_time sys_time do msleep 50 current pr...

Страница 187: ...t the baseline from the current value baseline current Search for something better if sys_time 2 0 seek_command COMMAND_LEFT else seek_command COMMAND_RIGHT result wait_for_better baseline 1000 if result 1 If that timed out search back the other direction if seek_command COMMAND_LEFT seek_command COMMAND_RIGHT else if seek_command COMMAND_RIGHT seek_command COMMAND_LEFT result wait_for_better base...

Страница 188: ...ND_STOP motor_a_dir brake motor_c_dir brake break default break int arbitrate int argc char argv while 1 if avoid_command COMMAND_NONE cputc a 0 else if seek_command COMMAND_NONE cputc s 0 else if cruise_command COMMAND_NONE cputc c 0 else cputc 0 lcd_refresh if cruise_command COMMAND_NONE motor_command cruise_command if seek_command COMMAND_NONE motor_command seek_command if avoid_command COMMAND...

Страница 189: ...ch behavior If the command is not COMMAND_NONE the current motor command is set from the behavior The later behaviors of course will overwrite the motor command The last behavior avoid is at the highest level If it chooses to control the robot Seek_enlightenment and cruise have nothing to say about it To make it clearer what s going on while the robot is running arbitrate writes a character to the...

Страница 190: ...re that makes everything run a little smoother every so often the baseline value is incremented This means that if the robot is stuck in a dark corner it will eventually get dissatisfied because of the increasing baseline and look for something better To communicate with the outside world about what s going on seek_enlightenment shows the current light value as well as the current baseline on the ...

Страница 191: ... you down you might consider using an emulator An emulator is a special program that runs on your development PC but acts like an RCX You can test your programs on the emulator much faster than you can test them on an actual RCX Currently one legOS emulator exists see the Online Resources section for details Debugging The display is your best friend when it comes to debugging legOS offers an impre...

Страница 192: ...s site It covers the tools you ll need where to get them and how to install them It also talks about programming in legOS and includes useful links to the online MINDSTORMS community Page 214 Another Low level Tool RCX Tools http graphics stanford edu kekoa rcx tools html This page contains a link to librcx a C library for interacting with the RCX s ROM routines It was developed by Kekoa Proudfoot...

Страница 193: ...s under Windows 95 98 or NT It includes links to various files you ll need Page 215 Installing legOS the unauth unofficial Lego RCX firmware http ex stormyprods com lego legOS html This page created by Brain Stormont also details the steps you ll need to follow to install a legOS development environment under Windows 95 It includes useful links to the relevant software Web Based Cross Compilers We...

Страница 194: ...s of various types of sensors you can build and considers some innovative possibilities for putting multiple sensors on one RCX input Mounting The first thing you should think about is how you are going to attach your new sensors to the LEGO world There are two goals to consider here 1 The sensor ideally should be a LEGO brick itself so you can easily attach it to your robots The sensors that come...

Страница 195: ...the top of it so that it s level with the surface of the brick Then you can drill a hole and thread the screw down into the brick An example of this technique is shown at http www kabai com lego lego htm Again you should replace diagonally opposite studs so that the sensor will be connected to the RCX regardless of the orientation of the wire brick You ll see an example of this technique later In ...

Страница 196: ...input The A D converter in the RCX converts the analog voltage to a digital raw input value from 0 to 1023 The A D converter itself has a resistance Rad but it s so small you probably don t have to worry about it The two diodes limit the voltage that can be seen by the A D converter this makes it hard to damage the RCX by hooking something up incorrectly Touch Sensors Touch sensors are the easiest...

Страница 197: ...to do is hook up the leads of the photoresistor to one of the RCX inputs Radio Shack sells Cadmium Sulfide CdS photoresistors that work well as robot sensors Figure 11 3 shows a photograph of one such photoresistor mounted in a brick using the machine screw mounting method Figure 11 3 A CdS photoresistor mounted in a brick The machine screws were mounted on the brick as described previously All th...

Страница 198: ... Chances are however that your device won t have the same electrical characteristics as the official temperature sensor Thus your temperature readings will be off slightly If you are concerned about correct temperature readings rather than just sensing increases and decreases in temperature you may want to convert raw sensors readings into temperature values yourself Powered Sensors It s a little ...

Страница 199: ... the power and signal on an input These six diodes make up a circuit called a signal splitter The circuit makes sure that all the electrons go in the right directions so your sensor circuit gets power and the RCX gets a sensor reading Diodes are used to steer the electrons the correct way Page 223 so that it doesn t matter which way the active sensor is attached to the input on the RCX Figure 11 5...

Страница 200: ...arity turns the sensor on and the other turns it off The on or off setting sticks until the opposite magnetic field is applied The processing circuitry is all built into the sensor Hooking up the sensor to the RCX is a matter of applying the signal splitter circuit from the previous section as shown in Figure 11 7 Figure 11 7 A Hall effect sensor circuit Once the sensor is hooked up you can read b...

Страница 201: ...exer circuit Pressing a single switch shorts out the corresponding resistance which reduces the raw input value Because each touch sensor has a different resistance the touch sensors each reduce the raw input readings by recognizable amounts Note that the resistors roughly double in value as you move from left to right This makes it easier to interpret the results of the touch multiplexer Each com...

Страница 202: ...dio controlled cars and airplanes They are actually an assembly of a motor some gearing and some electronics In response to an electronic signal they rotate an output shaft to a certain angle Interfacing a servo motor to the RCX is a matter of making the RCX produce the right signal You ll probably also need a power supply for the servo The bottom line however is that you can get just as much done...

Страница 203: ...ounted on diagonally opposite studs which would make them more useful TFM s Lego Page Lego Mindstorms Compatible Temperature Sensor http www akasa bc ca tfm lego_temp html This page describes the construction of a temperature sensor using the conductor plate mounting method Tools Black and Decker http www blackanddecker com powertools htm Black and Decker makes a tool called the Wizard With a cutt...

Страница 204: ...sroom packages and a fine assortment of spare parts Parts Table A 2 lists the parts you may wish to buy along with their prices at the three sources shown in Table A 1 This information is current as of mid 1999 LWS is LEGO World Shop S H is LEGO Shop at Home Service and Pitsco is Pitsco LEGO DACTA Note that the Shop at Home Service does not charge extra for shipping so the list is not exactly comp...

Страница 205: ...128 cm 5111 4 50 Wire brick set N779897 12 50 Large turntables N779876 9 75 Other Suppliers Table A 3 lists suppliers for electronics parts These are useful sources for the electronics described in Chapter 11 Make Your Own Sensors Table A 3 Sources for LEGO Parts Name Telephone Web Site Jameco 800 831 4242 http www jameco com Digi Key 800 344 4539 http www digikey com Mouser 800 346 6873 http www ...

Страница 206: ...nt Firmware Price Host OS Tools Neededa RCX Code visual no Win32b Not Quite C NQC http www enteract com dbaum lego nqc NQC no free MacOS Linux Win32 MacNQC http www enteract com dbaum lego nqc macnqc NQC no free MacOS ROBOLAB http www lego com dacta robolab defaultjava htm http www ceeo tufts edu graphics robolab html visual no 50 MacOS Win32 pbFORTH http www hempeldesigngroup com lego pbFORTH For...

Страница 207: ...rogram you ll need the Java Development Kit JDK version 1 1 or later see http java sun com products jdk 1 2 for the latest version You ll also need the Communications API a standard extension API that enables Java programs to use the serial and parallel ports of a computer see http java sun com products javacomm Usage The program downloader is called Download It s very simple to use you just need ...

Страница 208: ...println ucoe catch IOException ioe System out println An IOException occurred ioe private SerialPort mPort private Reader mFileIn private Writer mOut private PortListener mPortListener private static final int kCharSleep 20 Page 237 private static final int kTimeOut 800 public Download String filename String portName throws NoSuchPortException PortInUseException UnsupportedCommOperationException I...

Страница 209: ...loadException Timed out waiting for a response from the RCX else if mPortListener isError true throw new DownloadException Error mPortListener getLastLine System out print n else if c n mPortListener reset mOut write c mOut flush Thread sleep kCharSleep sendReturn Page 238 sendReturn catch InterruptedException ie System out println ie catch DownloadException de System out println System out printl...

Страница 210: ... class PortListener implements Runnable private Thread mThread private BufferedReader mIn private boolean mComplete false private boolean mError false private String mLastLine public PortListener Reader in mIn new BufferedReader in mThread new Thread this mThread start public void run String line try while line mIn readLine null Page 239 line line trim mLastLine line if line indexOf ok 1 mComplete...

Страница 211: ...for the RCX It s based on a JVM developed for a different 8 bit microcontroller the Motorola 68HC11 That JVM reportedly was only 6k which would certainly fit fine in the RCX s 32K of RAM LEGO Robots as JINI Devices JINI is a Java based standard from Sun Microsystems The basic premise of JINI is that devices should be able to connect and disconnect from networks seam Page 241 lessly You should for ...

Страница 212: ... it s still a work in progress For more information see the discussion lists at LUGNET Here s a discussion from mid 1999 http www lugnet com robotics rcx legos n 180 t i v c Page 243 Index A actuators 8 building 227 AI Artificial Intelligence robotics and 4 ambient light 49 angular velocity 33 arbitration 184 architecture subsumption 204 web site 188 arms grabber 156 mechanical 105 swing 107 Artif...

Страница 213: ...ing projects see projects bumpers 31 bushings 15 16 buttons legOS functions for 198 C cars 29 30 conductor plate attaching sensors with 218 constants 166 copper tubing attaching sensors with 217 Crickets web site 13 cross compiling 191 web sites 215 Cygwin package 191 web site 214 D datalog 71 retrieving 168 171 debouncing 153 delayed functions 163 ...

Страница 214: ... legOS 194 195 Page 244 drives differential 27 synchro 30 web site 38 tri star 37 drivetrains 112 Droid Developer Kit 10 E egcs compiler 191 web site 214 E L Group Epistemology and Learning Group web site 13 emulegOS web site 214 Epistemology and Learning Group E L Group web site 13 Eureka web site 13 expansion sets 10 Exploration Mars 10 Extreme Creatures 10 ...

Страница 215: ...126 FTP sites 37 examples in this book xiii functions legOS 194 204 Spirit ocx 163 G gear reduction 34 geared motors 34 gearing down 34 gears 31 35 worm 108 grabber arms 156 web sites 115 H Hall effect sensor 223 224 Hank the Bumper Tank 27 38 instructions for building 16 25 programming 204 211 Hitachi web site 81 I ...

Страница 216: ...ng 165 166 legOS 196 197 web site 227 instructions for building Hank the Bumper Tank 16 25 Minerva 83 102 remote control 147 150 RoboTag 174 179 thermometer 137 138 Trusty a Line Follower 40 44 internal gearing 34 IR infra red link 7 communications NQC 70 pbFORTH 119 J Java for RCX 240 JINI devices robots as 240 K Killough platform web sites 38 L ...

Страница 217: ...lopment cycle 211 emulator web site for 214 functions 194 204 static variables 212 web sites 213 light sensors 113 adding a second 50 building 220 221 Page 245 differential 226 legOS 197 programming 51 in NQC 79 80 LightSeeker c program 205 211 line following 39 Linux 233 locomotion 27 35 LUGNET LEGO Users Group Network web site 158 M machine screws attaching sensors with 217 ...

Страница 218: ...i web sites 11 Minerva instructions for building 83 102 programming 103 107 pbFORTH 138 142 remote control 154 157 MIT Programmable Brick web site 13 mobile robots 2 6 web sites 37 wheels 27 35 motors 34 35 servo 227 web sites 38 mounting sensors 217 218 multitasking 36 37 in legOS 199 203 NQC 72 74 music 68 70 N navigation 114 web site 115 ...

Страница 219: ... web sites passive sensors 219 221 pbFORTH Programmable Brick FORTH 233 debugging 142 143 program downloader 235 239 web sites 143 words 126 137 PBTurnOff function Spirit ocx 168 Perl 191 web site 214 Pitsco LEGO DACTA web sites 38 plates 15 Poll function Spirit ocx 165 166 power management pbFORTH 134 powered sensors 221 224 program downloader 9 Programmable Brick FORTH see pbFORTH programming ...

Страница 220: ...ooperative multitasking 135 137 in legOS 199 203 NQC see NQC pbFORTH see pbFORTH random numbers 64 remote control 151 154 RoboTag 180 188 Trusty a Line Follower 77 80 projects Hank the Bumper Tank 204 211 Minerva 82 115 Page 246 projects continued remote control 147 154 RoboTag 174 188 Trusty a Line Follower 39 51 pulleys 109 R random numbers 64 legOS 203 ...

Страница 221: ...4 RCXJVM 240 remote control instructions for building 147 150 programming 151 154 RIS Robotics Invention System 6 7 history of xi software 9 version 240 web sites 12 Robolab software 38 Robosports 10 RoboTag 173 188 instructions for building 174 179 programming 180 188 web site 188 Robotic Command Explorer see RCX robotics Artificial Intelligence AI and 4 behaviors 180 small approach 5 ...

Страница 222: ...talog function RCX 168 sensor watchers 36 sensors 216 legOS 197 mounting 217 218 passive 219 221 powered 221 224 web site 52 see also light sensors touch sensors servo motors 227 shafts 15 Shape Memory Alloy SMA wire 227 signal splitter 222 SMA Shape Memory Alloy wire 227 Smalltalk web site 171 solenoids 227 sounds legOS 203 pbFORTH 134 ...

Страница 223: ...site 188 symbolic constants 166 synchro drives 30 web site 38 T tasks 164 165 behaviors 180 telerobotics 145 147 see also remote control temperature sensors building 221 web site 228 Test Panel 48 tethered robots 3 thermistor 221 thermometer building instructions 137 138 timing 113 timer values retrieving 165 166 torque 33 touch multiplexer 224 226 ...

Страница 224: ...y a Line Follower instructions for building 40 44 programming 44 47 in NQC 77 80 turning radius 29 30 see also zero turning radius U Unix 233 UploadDatalog function Spirit ocx 169 V View button RCX 48 Visual Basic 159 171 Visual C 160 W web sites challenges and competitions 158 Hitachi H8 81 Killough platform 38 LEGO Group 11 ...

Страница 225: ... 38 RCX 214 RcxCC 81 RIS 12 RoboTag 188 Spirit ocx 171 Windows platform 214 215 wheels 27 35 idler wheels 50 While function Spirit ocx 166 167 Windows platform 233 legOS and web site for 214 215 wire brick 16 attaching sensors 217 worm gears 108 worms bevel 32 Z zero turning radius 27 see also turning radius ...

Страница 226: ...ngs through suspect means Machinery progressed from water operated to weight operated to clockwork structures incorporating such well known specimens as dolls who can say Mama and Papa c 1823 and the bejeweled enameled eggs created by Russian Court Jeweler Carl Fabergé Mechanical toys have affected the progress of industry and been intertwined with myth magic and literature from Prometheus to Asim...

Отзывы: