Robot and the Wall

Robot and the Wall - Robot Commands STAND SIT TURN (90...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
The Robot and the Wall Introduction to Pseudocode Your Name Goes Here
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Problem A robot is sitting on a chair, facing a wall a short distance away. The robot can sense the wall with its fingertips but cannot see the wall or the chair. Your assignment is to instruct the robot to walk to the wall and return to its initial position. You are to express the required logic in pseudocode.
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Robot Commands STAND SIT TURN (90 degrees) STEP ARMS UP ARMS DOWN ADD (Increment a counter) SUBTRACT (Decrement a counter) INITIALIZE (Zero a counter) The First Attempt Arms Up Zero Counter DO WHILE fingers do not sense wall Step Add ENDDO Arms Down DO WHILE counter not equal to zero Step Subtract ENDDO Sit The Solution...
View Full Document

This note was uploaded on 08/21/2011 for the course COMP 230 taught by Professor Phil during the Spring '11 term at DeVry NY.

Page1 / 5

Robot and the Wall - Robot Commands STAND SIT TURN (90...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online