Prologue to Programming RIS 2.0 RCX Code

Introduction to programming ris 2 0 rcx code l.jpg
1 / 45
0
0
816 days ago, 347 views
PowerPoint PPT Presentation

Presentation Transcript

Slide 1

Prologue to Programming RIS 2.0 RCX Code robofest 2005

Slide 2

Starting the RCX Programming Environment Double Click on the RCX symbol Once the program is stacked, make another client, or select a current a single Click on "Program" Click on "Free-form" robofest 2005

Slide 3

Starting the RCX Programming Environment robofest 2005

Slide 4

Mission 1: Drive Forward (with Timer) Go Forward for 5 seconds Stop robofest 2005

Slide 5

robofest 2005

Slide 6

Saving your work Go to File Click on Save Type in File Name. i.e. "In the first place Mission" robofest 2005

Slide 7

Downloading and Running 5 distinct projects can be stacked onto the RCX without a moment's delay Select which space you need to use by tapping on "Settings" and selecting one of the 5 openings Make beyond any doubt that the robot's IR port is confronting towards the IR tower, and snap "Download" When the download is done, you will hear a beep You can now run the program by squeezing the dim "Prgm" catch on the RCX to choose the opening you modified And press the green "Run" catch robofest 2005

Slide 8

Driving in Reverse Use the "Set Direction" hinder under "Little Blocks" robofest 2005

Slide 9

robofest 2005

Slide 10

After changing the headings, turn on the engines for 3 seconds robofest 2005

Slide 11

Turning Set the bearing of one engine to "Forward" and the course of the other engine to "Back" robofest 2005

Slide 12

Repeat For Play a beep 3 times Uses the "Rehash For" square. "Rehash For" indicates the quantity of times a specific activity is to be performed. i.e. Rehash Beep For 3 Times robofest 2005

Slide 13

Repeat For robofest 2005

Slide 14

Light Sensor Mounted to the front of the robot, confronting the ground Allows location of lines, white or dark, and in addition distinguishing lights, lasers, and other light sources Use the "View" catch on the robot to see the light sensor esteem over the dark line. Keep in mind or record this esteem. robofest 2005

Slide 15

Using the light sensor Select "Hold up Until" from the "Hold up" section Select "Light" and snap "Next" Select Input Port # to which the light sensor is associated. Press "Next". Select "Splendid" if searching for white line, "Dull" if searching for dark line. Press "Next". robofest 2005

Slide 16

Click on "Manual" and enter an esteem for the line. Typically it's the esteem from utilizing the "View" catch – 5 for a white line, or the esteem from utilizing the "View" catch + 5 for a dark line robofest 2005

Slide 17

Mission 2: Detect Edge When the light sensor recognizes an edge, beep three times robofest 2005

Slide 18

robofest 2005

Slide 19

Mission 3: Detect Light and Beep When the light sensor identifies a splendid light source, beep Repeat always robofest 2005

Slide 20

robofest 2005

Slide 21

Mission 4: Drive Forward and Stop Go forward until the edge of the load up/table Stop robofest 2005

Slide 22

Mission 4 Solution robofest 2005

Slide 23

Touch Sensor Touch sensor is appended to the guard When the guard is squeezed the touch sensor is actuated robofest 2005

Slide 24

Using the Touch Sensor Turn on the engines Select the "Hold up Until" square from the "Hold up" section or "Rehash Until" from the "Rehash" segment Make beyond any doubt "Touch" is chosen and press "Next" Choose Input Port # to which the touch sensor is associated, and press "Next" Make beyond any doubt "Press" is chosen, which will permit the robot to respond when the touch sensor is squeezed. Press "Next" once more. Press "Done" Turn off the engines robofest 2005

Slide 25

Mission 5: Touch Sensor If the touch sensor is squeezed once, turn on the left engine If the touch sensor is squeezed twice, kill the left engine, and turn on the right engine If the touch sensor is squeezed three times, turn on both engines If the touch sensor is squeezed four times turn both engines off Repeat Forever robofest 2005

Slide 26

robofest 2005

Slide 27

Mission 6: Yes or No Statements If the Light Sensor is identifying the edge then play Beep #1 Otherwise play Beep #2 Repeat Forever robofest 2005

Slide 28

robofest 2005

Slide 29

Mission 7: Right-Handed Line Follow with Touch Sensor If light sensor sees dark - turn right, generally – turn left Repeat the procedure until the guard is hit Stop robofest 2005

Slide 30

Mission 7: Right-Handed Line Follow with Touch Sensor robofest 2005

Slide 31

Mission 8: Line Follow and Stop Follow the dark line, until robot achieves edge of the load up Stop robofest 2005

Slide 32

Mission 8: Line Follow and Stop robofest 2005

Slide 33

Mission 9: Left-Handed Line Follow If light sensor sees dark - turn left, generally – turn right Repeat the procedure until the guard is hit Stop robofest 2005

Slide 34

Mission 9: Left-Handed Line Follow robofest 2005

Slide 35

Mission 10: Sensor Stacking Stack touch sensor on top of light sensor Follow the line, when touch sensor is initiated stop. At the point when the stacked touch sensor is squeezed the esteem on Port 2 will read 100. At the point when the touch sensor is not squeezed the esteem for the light sensor will be perused. robofest 2005

Slide 36

Mission 10: Sensor Stacking robofest 2005

Slide 37

Sensor Stacking With Tasks robofest 2005

Slide 38

Mission 11: Line Counter with Variables Go forward Count every line as the robot crosses it When the robot crosses the 3 rd line, stop. Utilizes factors to tally number of lines robofest 2005

Slide 39

Mission 11: Line Counter with Variables robofest 2005

Slide 40

Mission 12: Proximity Sensor (straightforward method*) Use the IR Transmitter and Light sensor to make a Proximity Sensor Constantly create IR messages, and utilize the Light Sensor to recognize the reflected IR pillar (*) There is another better technique to check changes of the light force robofest 2005

Slide 41

robofest 2005

Slide 42

Mission 13: IR Communications One RCX is communicating something specific, the other is getting it Confirm that the message has been gotten by beeping robofest 2005

Slide 43

Transmitter Solution robofest 2005

Slide 44

Receiver Solution robofest 2005

Slide 45

This PowerPoint will be posted online at http://www.robofest.net/resources.htm robofest 2005

SPONSORS