Library | Building | Programming | Quick Guides Home | Quick Guides to Building | Quick Guides to Programming | LVLM | WeDo
ROBOLAB

DocumentsDate added

Order by : Name | Date | Hits [ Descendent ]
file icon Drive for Timehot!Tooltip 05/26/2006 Hits: 1611
file icon Drive to Black Linehot!Tooltip 05/26/2006 Hits: 1788
file icon Echo Locationhot!Tooltip 05/26/2006 Hits: 1594
file icon Hello Worldhot!Tooltip 05/26/2006 Hits: 1906
file icon Line Follower: Eventshot!Tooltip 05/26/2006 Hits: 3008
file icon Line Follower: Wait for Darkhot!Tooltip 05/26/2006 Hits: 2282
file icon Lurchhot!Tooltip 05/26/2006 Hits: 1561
file icon Lurch Subroutinehot!Tooltip 05/26/2006 Hits: 1573
file icon NXT - 3 Button Sensor Remotehot!Tooltip 05/30/2006 Hits: 2113

 

Like its smaller cousin, the three-button remote control is a great way to define unique behaviors for your robot. The advantage to the three-button control is that there are now 8 possible behavior combinations, compared to just 4 on the 2-button remote. In addition to forward, left and right motion on our two motor car, it is now possible to move in reverse, and even control a third motor. With so many combinations, it is possible that you don?t need them all. In a case like that, simply wire the fork branch you don?t want to control straight into the merge fork block. If the program travels along that branch, it will simply jump back to the beginning again.

file icon NXT - Controlling the Displayhot!Tooltip 05/30/2006 Hits: 2391

 

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.

«StartPrev1234NextEnd»
Page 2 of 4
Home | About Us | Contact Us
© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.