Robofest 2005 rcx code workshop jan 29 2005 cj chung
This presentation is the property of its rightful owner.
Sponsored Links
1 / 40

Robofest 2005 RCX code Workshop Jan 29, 2005 CJ Chung PowerPoint PPT Presentation


  • 156 Views
  • Uploaded on
  • Presentation posted in: General

Robofest 2005 RCX code Workshop Jan 29, 2005 CJ Chung. 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).

Download Presentation

Robofest 2005 RCX code Workshop Jan 29, 2005 CJ Chung

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Robofest 2005 rcx code workshop jan 29 2005 cj chung

Robofest 2005RCX code WorkshopJan 29, 2005CJ Chung

chung


Agenda

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)

chung


Assistants

Assistants

  • Warren Beard

  • Steven Kryskalla

chung


Why icon based visual programming languages

Why Icon based Visual Programming Languages?

chung


Robofest 2005 rcx code workshop jan 29 2005 cj chung

Right Lane

Ends

chung


Robofest 2005 rcx code workshop jan 29 2005 cj chung

chung


Go forward for 2 sec and stop

Go forward for 2 sec. and stop

program test {

#include <RCX2.h>

#include <RCX2MLT.h>

#include <RCX2Sounds.h>

#include <RCX2Def.h>

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

}

}

chung


Go forward for 2 sec and stop1

Go forward for 2 sec. and stop

chung


Rcx code vs robolab comparison table

RCX code vs RoboLab Comparison Table

chung


Robofest 2005 rcx code workshop jan 29 2005 cj chung

chung


Robofest statistics programming language used by teams in robofest 2004

Robofest Statistics: Programming Language Used by Teams in Robofest 2004

Data from 85 teams

chung


Robolab vs rcx code

RoboLab vs. RCX code

Follow a line and stop when the bumper is hit.

chung


Rcx code hands on workshop by andrey shvartsman see another slide intro2rcx ppt

RCX code hands-on workshop

by

Andrey Shvartsman

(See another slide: intro2RCX.ppt)

chung


Robotic invention system rcx code 2 0 block types

Robotic Invention SystemRCX code 2.0Block Types

Use them

chung


Robofest 2005 rcx code workshop jan 29 2005 cj chung

Avoid using them.

They are for a specific robot.

They won’t work on your robot.

Avoid using Sensors unless you have independent tasks

chung


Power commands

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.

chung


Can you simplify this program

Can you simplify this program?

chung


Wait commands

Wait Commands

  • Wait For

  • Wait Until

chung


Remember

Remember!

  • Cover your robot and IR tower when you download programs

  • Save your programs

  • File Names should be meaningful

  • Use logbook and comment

chung


Repeat

Repeat

  • Repeat For

  • Repeat Forever

  • Repeat While

  • Repeat Until: sensor watcher

chung


Difference between repeat until and repeat while

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.

chung


Structured programming in rcx code

Structured Programming in RCX code

  • Use My Blocks

  • No parameters

  • Macros, not subroutines

chung


My blocks

My Blocks

chung


Opening a saved program

Opening a saved program

  • Never use File | Open! There is a bug involving MyCommands

  • Use Main Menu | Program | Vault

chung


Line following zigzag methods

Line following - Zigzag methods

chung


Robofest 2005 rcx code workshop jan 29 2005 cj chung

chung


Zigzag without sensor watchers

Zigzag without Sensor Watchers

chung


What will happen if the robot starts here

What will happen if the robot starts here…

here

chung


Line following with 2 light sensors

Line following with 2 light sensors

chung


Line following with 2 light sensors ii

Line following with 2 light sensors II

chung


Line following with 2 light sensors iii

Line following with 2 light sensors III

chung


End program

End Program

  • Without “End Program”, you need to press Green button to stop the program

chung


Comments

Comments

  • Comment Block

  • Log book

chung


Useful techniques

Useful Techniques

  • End Program

  • LCD View

  • Display Value

    • Timers

    • Variables

    • Sensors

    • IR Messages

  • Beeps and Tones to debug by hearing

chung


Move forward until the robot reaches a black line area or hit a wall detected by a touch sensor

Move forward until the robot reaches a black line (area) orhit a wall (detected by a touch sensor)

Question:

chung


Solution using sensor watchers

Solution using sensor watchers

chung


Move forward until the robot reaches a black line area or hit a wall detected by a touch sensor1

Move forward until the robot reaches a black line (area) orhit a wall (detected by a touch sensor)

Solution without using

Sensor watchers

chung


Move forward until the robot reaches a black line area or hit a wall detected by a touch sensor2

Move forward until the robot reaches a black line (area) orhit a wall (detected by a touch sensor)

Solution without using

Sensor watchers with using a variable

?

chung


Ris 2 0 xp patch

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

chung


Epilog

Epilog

  • Read Robofest 2005 Rules

  • Control vs. Speed

  • Exhibition

  • FAQ

  • LTU is planning Robofest Playing Field Sale: Please contact [email protected]

chung


  • Login