Download presentation
Presentation is loading. Please wait.
Published byJasmine Meyer Modified over 11 years ago
1
1chung Robofest 2005 RCX code Workshop Jan 29, 2005 CJ Chung
2
2chung Agenda Comparison of RCX code and RoboLab programming languages (Chung, 15 min) RIS RCX code programming tutorial (Shvartsman, 70 min) Break – 10 min RIS RCX code programming tutorial 2 (Shvartsman, 70 min) RCX code tips (Chung, 15 min)
3
3chung Assistants Warren Beard Steven Kryskalla
4
4chung Why Icon based Visual Programming Languages?
5
5chung Right Lane Ends
6
6chung
7
7 Go forward for 2 sec. and stop program test { #include main { ext InterfaceType "kFreestyle" rcx_ClearTimers bbs_GlobalReset([A B C]) try { on [ A C ] } retry on fail wait 200 try { off [ A C ] } retry on fail }
8
8chung Go forward for 2 sec. and stop
9
9chung RCX code vs RoboLab Comparison Table
10
10chung
11
11chung Robofest Statistics: Programming Language Used by Teams in Robofest 2004 Data from 85 teams
12
12chung RoboLab vs. RCX code Follow a line and stop when the bumper is hit.
13
13chung RCX code hands-on workshop by Andrey Shvartsman (See another slide: intro2RCX.ppt)
14
14chung Robotic Invention System RCX code 2.0 Block Types Use them
15
15chung Avoid using them. They are for a specific robot. They wont work on your robot. Avoid using Sensors unless you have independent tasks
16
16chung Power Commands On On For Off Coast Brake Set Power: Min 1, Max 8 Set Direction Reverse Direction: Not recommended to use. Use Set Direction instead.
17
17chung Can you simplify this program?
18
18chung Wait Commands Wait For Wait Until
19
19chung Remember! Cover your robot and IR tower when you download programs Save your programs File Names should be meaningful Use logbook and comment
20
20chung Repeat Repeat For Repeat Forever Repeat While Repeat Until: sensor watcher
21
21chung Difference between Repeat Until and Repeat While Repeat Until command constantly monitors the sensor or variable and interrupts the repeated set of commands as soon as the condition is true. Repeat While: repeat a stack of commands as long as a condition is true; command only tests the sensor or variable at the end of each repeat.
22
22chung Structured Programming in RCX code Use My Blocks No parameters Macros, not subroutines
23
23chung My Blocks
24
24chung Opening a saved program Never use File | Open! There is a bug involving MyCommands Use Main Menu | Program | Vault
25
25chung Line following - Zigzag methods
26
26chung
27
27chung Zigzag without Sensor Watchers
28
28chung What will happen if the robot starts here… here
29
29chung Line following with 2 light sensors
30
30chung Line following with 2 light sensors II
31
31chung Line following with 2 light sensors III
32
32chung End Program Without End Program, you need to press Green button to stop the program
33
33chung Comments Comment Block Log book
34
34chung Useful Techniques End Program LCD View Display Value Timers Variables Sensors IR Messages Beeps and Tones to debug by hearing
35
35chung or Move forward until the robot reaches a black line (area) or hit a wall (detected by a touch sensor) Question:
36
36chung Solution using sensor watchers
37
37chung or Move forward until the robot reaches a black line (area) or hit a wall (detected by a touch sensor) Solution without using Sensor watchers
38
38chung or Move forward until the robot reaches a black line (area) or hit a wall (detected by a touch sensor) ? Solution without using Sensor watchers with using a variable
39
39chung RIS 2.0 XP Patch will stop the Robotics Invention System 2.0 launcher window from appearing when Windows XP is started. Now available for download at www.legomindstorms.com
40
40chung Epilog Read Robofest 2005 Rules Control vs. Speed Exhibition FAQ LTU is planning Robofest Playing Field Sale: Please contact chung@ltu.edu
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.