Download presentation
Presentation is loading. Please wait.
Published byWilliam Kent Modified over 11 years ago
1
RCX Workshop Day 2 Programming with Touch Sensor Light Sensor Repeat CJ Chung Associate Professor of Computer Science Lawrence Technological University
2
Start-Touch Wait until the touch sensor is pressed; Then start the robot to go forward Stop after a second
3
Start-Touch
4
Start-Bright Wait until the light sensor detects very bright light Then start the robot to go forward Stop after a second
5
Start-Bright
6
Stop-Touch Go straight until the bumper is hit then stop
7
Stop-Touch
8
Go Till Edge Go straight until the white edge of the ring Then stop
9
Go Till Edge
10
Loop To repeat a sequence of code blocks Until Number of repetitions Forever Elapsed time Sensor condition is met Logic becomes true
11
To play A note three times
12
Make the robot move around in the ring – Basic Sumo (Sumo0) Repeat the following forever: Go forward until the edge Backward slightly Turn right
13
Make the robot move around in the ring – Basic Sumo (Sumo0) Repeat the following forever: Go forward until the edge Backward slightly (in Big block) Turn right
14
First Sumo Competition
15
Additional Mission, if time available Unknown start – Let the robot wait 5 seconds when the game starts
16
Additional Mission, if time available Touch the wall Go back slightly Turn (spin) right Stop at the target; Wall Start
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.