11.07.2015 Views

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2 Ghost RobotThe goal of the Ghost <strong>robot</strong> is to roam the maze reading its beacon signal toestimate the current location of Pac-Man. Having knowledge of the maze inadvance, the Ghost solves for the shortest path to reach Pac-Man and moves to theestimated position. It constantly does this until it contacts Pac-Man at whichpoint it will freeze for a few seconds to allow Pac-Man to escape.Four modules are identified in the Ghost <strong>robot</strong> that help it achieve its above goal.• Obstacle sensors (front, left, right) prevent the Ghost from running intomaze walls and help straighten itself if it is off-centred.• The beacon sensor reads a broadcast signal from Pac-Man and uses it toestimate the current position of Pac-Man• Stepper motors perform the actual movement of the <strong>robot</strong>.• The Pac-Man contact sensor notifies the event of having caught Pac-Man.Obstacle Sensors(front, left, right)Stepper MotorsPIC16F877MicrocontrollerPac-ManBeacon SensorPac-ManContact SensorFigure 39. Architectural model of Pac-Man softwarePin assignments for the Ghost are similar to that of Pac-Man except for themodules that the Ghost do not have and the beacon sensor. There are four beaconsensors, one to detect each of the four directions Pac-Man may be away from theGhost. They use analog pins 7, 8, 9, and 10.30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!