RCX Workshop Day 2 - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

RCX Workshop Day 2

Description:

Start-Bright. Wait until the light sensor detects very bright light ... Start-Bright. Stop-Touch. Go straight until the bumper is hit. then stop. Stop-Touch. Go ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 17
Provided by: cjc1
Category:
Tags: rcx | bright | day | workshop

less

Transcript and Presenter's Notes

Title: RCX Workshop Day 2


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
Write a Comment
User Comments (0)
About PowerShow.com