Library | Building | Programming | Quick Guides Home | Quick Guides to Building | Quick Guides to Programming | LVLM | WeDo
NXT - Controlling the Display
Details for NXT - Controlling the Display
PropertyValue
NameNXT - Controlling the Display
Description

 

The RCX display is a powerful tool for receiving feedback from different programs. Often times, however, it is necessary to monitor more than one variable at the same time. One solution to this problem is to use a program similar to the one above.

The code above is designed to give feedback on two touch sensors. The first step is to zero all relevant containers. Remember, since containers are also global, old values from earlier tests could still be stored, so zeroing them is essential. Next, a task split is used to monitor the two touch sensors separately. Each branch of the split waits for its touch sensor to be pressed, adds either 1 or 100 to the red container, and then waits for the sensor to be released. Thus the total clicks of touch sensor 1 will be displayed in first two digits of the display, and the total clicks of touch sensor 2 will be displayed in the last two digits of the display. This code can be adapted to show any kind of sensor value, including light or rotation. If the variables are in seperate containers in the program, just multiply one container by a constant so that it will display in the hundreds or thousands place on the display. Then just add the two contatiners together in a thrid container and display that value.

FilenameNXT_control.display.vi
Filesize115.77 kB
Filetypevi (Mime Type: application/octet-stream)
Creatormu579
Created On: 05/30/2006 10:09
ViewersEverybody
Maintained byEditor
Hits2393 Hits
Last updated on 05/31/2006 10:36
Homepage
CRC Checksum
MD5 Checksum
Home | About Us | Contact Us
© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.