11.07.2015 Views

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LCD. If it comes in contact with the Ghost <strong>robot</strong>, it will freeze in shock for a fewseconds before recovering.Six modules are identified in the Pac-Man <strong>robot</strong> that help it achieve its abovegoal.• Obstacle sensors (front, left, right) prevent Pac-Man from running intomaze walls and help straighten itself if it is off-centred.• An LCD display shows the number of dots Pac-Man has collected and thenumber of times it has been caught by the Ghost.• RF controls the direction of movement of Pac-Man around the maze.• Stepper motors perform the actual movement of the <strong>robot</strong>.• The maze-dot sensor looks for the LEDs on the floor that it will “collect.”• The Ghost contact sensor notifies the event of being caught by the Ghost.LCD displayObstacle Sensors(front, left, right)RF ReceiverStepper MotorsPIC16F877MicrocontrollerMaze Dot SensorGhost ContactSensorFigure 30. Architectural model of Pac-Man softwareGiven these modules, the pin assignments they require are laid out as follows.Note that the RF signal, Ghost contact, and maze-dot sensor are events that canhappen at any point during the game so the pin assignments are chosen on pins38-40 such that they are handled by an interrupt service routine. Also, pins 2-9are analog inputs so that right, left, and front obstacle sensors can estimate thedistance from a wall as a function of the voltage input.24

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

Saved successfully!

Ooh no, something went wrong!