Extreme MINDSTORMS TM : An Advanced Guide to LEGO MINDSTORMS TM

Similar documents
STB Front Panel User s Guide

The Definitive Guide to the.net Compact. Framework LARRY ROOF AND DAN FERGUS. APress Media, LLC

SYNGRESS OUTLET Our outlet store at syngress.com features overstocked, out-of-print, or slightly hurt books at significant savings.

Edge Connector Light Level Detector

Linear Circuit Design Handbook

Lego Robotics Module Guide

Netzer AqBiSS Electric Encoders

DMC550 Technical Reference

Manual Version Audio/Video Switchers. AV4x1P AV8x1P AV8x1A

BASIC LINEAR DESIGN. Hank Zumbahlen Editor Analog Devices, Inc. All Rights Reserved

What s New in Visual FoxPro 7.0

E3/DS3 Tap. 6xBNC Type

PayMatic P2000. Installation Manual PayMatic P2000. Product Version: N/A. Version of this manual: Inepro B.V. All rights reserved

(Skip to step 11 if you are already familiar with connecting to the Tribot)

Lt DELTA USA, Inc

User Manual. Model 1372A and 1374A HDMI Switchers. 1T-SX-632 Model 1372A 2X1 Switcher. v1.3 2x1 SWITCHER. v1.3 INPUT ENHANCE POWER

MORE JOEL ON SOFTWARE

CP-298H HDMI to HDMI Scaler Box

Model R177M and R177S Baseband Switch

SignalTap Plus System Analyzer

PM-240-MTP Multifiber Optical Power Meter INSTRUCTION MANUAL

RS232 settings are internally definable via jumper blocks, to accommodate interfacing with a wide range of control products.

Slot-type Photomicrosensor with connector or pre-wired models (Non-modulated) *1. configuration. Dark-ON/Light-ON

"shell" digital storage oscilloscope (Beta)

PRINCIPLES AND APPLICATIONS

APPLICATION NOTE 4312 Getting Started with DeepCover Secure Microcontroller (MAXQ1850) EV KIT and the CrossWorks Compiler for the MAXQ30

Lesson Sequence: S4A (Scratch for Arduino)

Samsung VTU11A0 Timing Controller

Modular DAA with 2/4 Wire Convertor. XE0002D Block Diagram

Installation and Operation Manual

HDS-21RS Owner s Manual 2 x 1 HDMI Switch with Scaling

RS232 settings are internally definable via jumper blocks, to accommodate interfacing with a wide range of control products.

PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL CONDITIONING

Contents. Instruction Manual T-Rex Page 2 of 16 Release 1.01

EDDYCHEK 5. Innovative eddy current testing for quality and process control. Touchscreen. Networking. All major applications.

SmartCrystal Cinema Neo

Operating Manual. 50mW C-Band EDFA with GPIB and RS232 Interface

B. The specified product shall be manufactured by a firm whose quality system is in compliance with the I.S./ISO 9001/EN 29001, QUALITY SYSTEM.

Owners Manual PERREAUX

AU-1HARC HDMI to Stereo Audio (2 Phono) ARC Extractor OPERATION MANUAL

Model: AV D Keyboard Controller. User Manual. Please Read this User Manual throughout before using.

FLIR CM82: 600 Amp Power Clamp Meter with VFD Mode

AMERICAN NATIONAL STANDARD

Cat5 DVI-D Extender. User s Guide Avenview Inc. All rights reserved.

SMART CINEMAHORIZONTAL. User Guide VPSP Projector side. model. Notice SmartCrystal Cinema MUV V1R0

MICROMASTER Encoder Module

GeniSys Display. Contractor s Tool. Description / Applications. for the GeniSys Advanced Burner Control

System 2000 System 2000 HLK relay insert. 1 Safety instructions. 2 Device components. 3 Function. Order No. : Operating instructions

Sport-TIMER 3000 TM Instruction Manual

Use xtimecomposer and xscope to trace data in real-time

P XGA TFT Monitor. User s Manual

34MD Series. Motor/Driver Combination. User s Guide E. Landon Drive Anaheim, CA

1 Safety instructions. 2 Device components. 3 Function. Light Management Relay switch insert 2-channel. Art.-No.: 1202 URE.

ANI-5.1CH HDMI 2CH/5.1CH Audio Extractor

UTP ACTIVE TRANSCEIVER HUB

DNA-STP-SYNC Synchronization and Screw Terminal Panel. User Manual

CM-398 CV/SV to PC Converter Box

LEGO MINDSTORMS PROGRAMMING CAMP. Robotics Programming 101 Camp Curriculum

Clipsal and C-Bus are registered trademarks of Clipsal Australia Pty Ltd.

CM-398H. CV/SV to HDMI Converter with Audio Input. Operation Manual

THE LITTLE BOOK. bees

_FM 7/22/09 10:10 AM Page 1 COLLABORATING. with SharePoint. Carey Cole

Computer Architecture and Organization. Electronic Keyboard

FLIR CM82: 600 Amp Power Clamp Meter with VFD Mode

An Introduction to Digital Logic

SmartCrystal Cinema Neo

DCT-11S SRS TruVolume TM SCART Volume Leveler

USER MANUAL. DV-HSW-41 HDMI 4x1 SWITCHER LIT Bergen Boulevard, Woodland Park, NJ Tel FAX Web

SUBCARRIER TRANSFER FILTER INSTRUCTION BOOK IB622702

Automated Local Loop Test System

Model: S-1071H(EFP) 7" EFP Field On-camera LCD Monitor. User Manual. Please read this User Manual throughout before using.

USERS GUIDE MCX-HTS. HDMI to 3G SDI Converter. Manual Number:

Extender w/ RS-232 and 2-way IR

CHQV-2H. HDMI to HDMI Scaler Box. Operation Manual CHQV-2H

ENGLISH. Technical Specifications. Version 1.1 May 2000 MULTICOM PRO MDX4400.

ivw-fd122 Video Wall Controller MODEL: ivw-fd122 Video Wall Controller Supports 2 x 2 Video Wall Array User Manual Page i Rev. 1.

feno before light and beyond

VS-162 / VS-164. User Manual

AWT150C/AWT150CS/ AWT151C CCD Camera

MCS3-SP-RS422. Compact Jog/Shuttle Controller. Users Manual

RoBoard Panel RP-089 Manual V1.0 The Heart of Robotics. Jul 2010 DMP Electronics Inc

R&S RT-Zxx Oscilloscope Adapters Specifications. Data Sheet V23.00

USER GUIDE 3. For more information visit

Model Extend HDMI audio and video connections up to 300 feet. Add up to 8 additional receivers with a dedicated network switch

E6CP-A. An Absolute Encoder at About the Same Price as an Incremental Encoder. Ideal for robot limit signals. Low-cost Encoder with Diameter of 50 mm

CMLUX-4H4CAT. 4 by 4 HDMI V1.3 over CAT 6 Matrix with IR Return Control. Operation Manual CMLUX-4H4CAT

PRO-SDI44/84/124/164. 4x4/8x4/12x4/16x4 3G-SDI Matrix Switchers OPERATION MANUAL

All-in-One Matrix Switcher

ER-100 Eurorack 8 Channel Stereo, Transformer Balanced Out Summing Mixer User Manual

DisplayPort Extender over 2 LC Fibers

Owners SW-LCD 2.0 Manual & Specifications

Master Time Clock MTC Users Manual

10Gbps SFP+ Optical Transceiver, 10km Reach

VALCOM HANDSFREE TALKBACK PAGING SYSTEM DESIGN/INFORMATION

DELV-2LCD-7XLPRO DELV-2LCD-7XLRM DELV-2LCD7XLS (SDI) USER MANUAL

*Prefer. 600 MHz 4K ULTRA. 60Hz, 4:4:4. over one SC-Terminated Fiber-Optic Cable EXT-DP-4K600-1SC. User Manual. Release A1

DCT-3 Digital to Analog Stereo Audio Converter

Digital Strobe Tuner. w/ On stage Display

Programmable Power Supplies 188 W 384 W R&S HMP Series

Driver circuit for CCD linear image sensor

Transcription:

IURQWIP3DJHL:HGQHVGD\2 WREHU30 Extreme MINDSTORMS TM : An Advanced Guide to LEGO MINDSTORMS TM DAVE BAUM, MICHAEL GASPERI, RALPH HEMPEL, AND LUIS VILLA

IURQWIP3DJHLL:HGQHVGD\2 WREHU30 Extreme MINDSTORMS TM : An Advanced Guide to LEGO MINDSTORMS TM Copyright 2000 by Dave Baum, Michael Gasperi, Ralph Hempel, and Luis Villa All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN (pbk): 1-893115-84-4 Printed and bound in the United States of America 12345678910 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Editorial Directors: Dan Appleman, Gary Cornell, Karen Watterson Technical Reviewers: Dave Baum, Rodd Zurcher Projects Manager: Grace Wong Developmental Editor and Indexer: Valerie Perry Copy Editor: Kiersten Burke Production Editor: Janet Vail Page Composition and water braiding: Susan Glinert Artist and Cover and Part Opener Designer: Karl Miyajima Distributed to the book trade in the United States by Springer-Verlag New York, Inc.,175 Fifth Avenue, New York, NY, 10010 and outside the United States by Springer-Verlag GmbH & Co. KG, Tiergartenstr. 17, 69112 Heidelberg, Germany In the United States, phone 1-800-SPRINGER; orders@springer-ny.com; http://www.springer-ny.com Outside the United States, contact orders@springer.de; http://www.springer.de; fax +49 6221 345229 For information on translations, please contact Apress directly at 901 Grayson Street, Suite 204, Berkeley, CA, 94710 Phone: 510-549-5931; Fax: 510-549-5939; info@apress.com; http://www.apress.com The information in this book is distributed on an as is basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the authors nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.

IURQWIP3DJHLLL:HGQHVGD\2 WREHU30 Foreword... viii Chapter 1 Extreme MINDSTORMS... 3 The Hackers Step In... 4 MINDSTORMS Expands... 6 RIS 2.0... 8 An Extreme Future... 8 Chapter 2 The RCX... 11 Architecture... 11 Hardware... 14 Output Ports... 16 Sensor Ports... 18 LCD... 25 Sound... 26 Standard Firmware... 27 Programming the RCX... 29 Chapter 3 Seeker: A Light-Seeking Robot... 31 Construction... 31 Using the Bumper... 36 Seeking a Light... 41 Bumping and Seeking... 44 More Explorations... 51 Chapter 4 RCX 2.0 Firmware... 53 Getting Started... 53 Local Variables... 56 Display... 57 Arrays... 60 Access Control... 64 Events... 68 Bits and Pieces... 76 iii

IURQWIP3DJHLY:HGQHVGD\2 WREHU30 Chapter 5 Introduction to pbforth...79 pbforth Is Interactive...79 pbforth Is Interpreted...80 pbforth Is Extensible...80 Why Learn pbforth?...80 Why Learn about RCX Details?...81 Installing pbforth...83 pbforth Fundamentals...85 RCX Basics and Generating Output...89 Numbers and Expressions...95 Defining New Words for pbforth...101 Conditionals and Bitwise Operators in pbforth...104 Basic RCX Sensors and Motors...107 Looping in pbforth...110 Using the Pushbuttons...111 Summary...117 Chapter 6 Programming Seeker in pbforth...119 Making Seeker Move...120 Displaying Motor States...122 Making Seeker See and Feel...130 Using the Timers...138 The Light Sensor and Thresholds...141 Summary...148 Chapter 7 Introduction to LegOS...151 So Why LegOS?...151 So What s the Catch?...152 So, How Does it Work?...152 Basic LegOS Functions...156 The LegOS Seeker...170 Conclusion...180 Chapter 8 Advanced LegOS...181 Rotation Sensors...181 Sound...183 Math in LegOS...186 LegOS Network Protocol (LNP)...187 LegOS Debugging...188 iv

IURQWIP3DJHY:HGQHVGD\2 WREHU30 Trailerbot... 189 Going Further with LegOS Use the Source, Luke!... 213 Chapter 9 Homebrew Passive Sensors... 219 Getting Parts... 219 Alligator Clip Quickie... 220 Coin Detector... 222 Cut Wire Connector... 223 Stick-In-Ring Switch... 224 Terminal Block Temperature Sensor... 225 RCX Input... 227 More Accurate Temperature Sensors... 228 Waterproof Temperature Sensor... 231 A Relative Humidity Sensor... 232 50K Ohm Potentiometer Angle Sensor... 234 Cut Electric Plate Connector... 237 CdS Photocell Sensor... 238 Galvanic Skin Response... 240 Voltage Input Sensor... 242 Battery Tester... 243 A Tachometer... 244 A Potpourri of Passive Sensors... 245 Part Cross-reference List... 246 Conclusion... 247 Chapter 10 Homebrew Powered Sensors... 249 Getting Parts and Tools... 249 Getting Started... 249 RCX Powered Interface... 250 Sensor Power Circuit... 250 Sensor Measurement Circuit... 254 Optointerrupter Sensor... 256 Buffer Circuit... 258 Buffered Voltage Input... 261 Amplifier Circuit... 261 Amplified Voltage Input... 263 Differential Light Sensor... 263 Sound Sensor... 266 Printed Circuit Board... 271 Soldering... 272 Packaging... 277 v

IURQWIP3DJHYL:HGQHVGD\2 WREHU30 Going Further...279 Bill of Materials for Powered Sensors...279 Conclusion...282 Appendix A Internet Resources...283 General Information...283 NQC...283 pbforth...284 LegOS...284 Homebrew Sensors...284 Suppliers...284 Appendix B NQC API Reference...287 Sensors...287 Outputs...289 Sound...290 Display...291 Communication...291 Timers and Counters...292 Access Control...293 Events...294 Miscellaneous...296 Special Features RCX...296 Special Features Scout...297 Special Features CyberMaster...298 Appendix C Frequently Used Forth Words...299 Stack Words...300 Math Words...301 Logical Words...302 Conditional Words...303 Compiler and Memory Words...303 Control Structure Words...306 Input and Output Formatting Words...307 RCX Extension Words...308 vi Appendix D LegOS API Reference...317 LCD Functions...317 Motor Functions...318

IURQWIP3DJHYLL:HGQHVGD\2 WREHU30 Sensor Functions... 318 Math Functions... 319 Program Control... 320 Time Control... 320 Hardware Control... 321 Music... 321 Buttons... 322 Semaphores... 322 LNP functions... 323 Standard C Library Functions... 323 Appendix E Installing LegOS... 325 LegOS Installation for Debian Linux... 326 LegOS Installation for Red Hat Linux... 327 LegOS Installation for Windows... 329 Index... 333 vii

http://www.springer.com/978-1-893115-84-2