
SetPower(OUT_A + OUT_C, POWER);
OnFwd(OUT_A + OUT_C);
start watcher;
}
task watcher() {
while (true) {
if (SENSOR_2 < DARK2) {
if (SENSOR_3 < DARK3) state = BOTH_ON;
else if (SENSOR_3 > LIGHT3) state = LEFT_ON;
else state = INDETERMINATE;
}
else if (SENSOR_2 > LIGHT2) {
if (SENSOR_3 < DARK3) state = RIGHT_ON;
else if (SENSOR_3 > LIGHT3) state = BOTH_OFF;
else state = INDETERMINATE;
}
else state = INDETERMINATE;
}
}
Page 81
Online Resources
NQC—Not Quite C
http://www.enteract.com/~dbaum/lego/nqc/
This is the official site for NQC. You can download the current release, read the documentation, or browse a FAQ. Dave Baum has packed a lot of useful information into this site, including such
gems as how to create a cable to connect your Macintosh to the IR tower. This site also includes the definitive NQC documentation.
Lego Robots: RCX Command Center
http://www.cs.uu.nl/people/markov/lego/rcxcc/
RCX Command Center (RcxCC), developed by Mark Overmars, is built on top of NQC. It's a Windows application that provides a friendly graphic interface to the features of NQC. It includes a
syntax-colored program editor, real-time control of the 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 Saddi's NQC Reference Page
http://home1.gte.net/ksaddi/mindstorms/nqc-reference.html
This page provides a distilled view of NQC. It's very handy when you can't remember the input type constants, or you'd like to see NQC's commands organized by function. Single-line code
samples are also included.
Hitachi Single-Chip Microcomputer H8/3297 Series…
http://semiconductor.hitachi.com/products/pdf/h33th014d2.pdf
This PDF document has all the crufty details on the Hitachi H8 that forms the heart of the RCX. The specific model is the H8/3292, which is covered in the manual. This information is not for
casual browsing—you probably won't need to look here unless you start writing your own firmware. (Hitachi's web site is a little flakey. If you're having trouble with this URL, try starting at the
URL
Содержание MINDSTORMS Robots
Страница 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 ...
Страница 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 ...
Страница 41: ...Page 41 ...
Страница 43: ...Next build the support for the light sensor ...
Страница 80: ...Page 85 Make sure the bump on the long pin is up against the 4u beam ...
Страница 82: ......
Страница 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 ...
Страница 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 ...