Matthew murach
1 / 10

Matthew Murach - PowerPoint PPT Presentation

  • Uploaded on

Overview of Project 3 Slides are available at : Updated 1/28 Due Date for project has been extended to next Friday 2/6 Matthew Murach Project 3: The Wall For this project, you are hard coding a set path to avoid an oncoming wall.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Matthew Murach' - benjamin

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Matthew murach l.jpg

Overview of Project 3Slides are available at : 1/28Due Date for project has been extended to next Friday 2/6

Matthew Murach

Project 3 the wall l.jpg
Project 3: The Wall

  • For this project, you are hard coding a set path to avoid an oncoming wall.

  • The timing methods used from the last project will be used again in this project for distance estimation

  • If the code works the robot should detect the oncoming wall and pass-through the finish line

Project 3 the wall3 l.jpg
Project 3: The Wall

  • For this project your code should be organized roughly as follows:

    void right(){} /* do right turn */

    void left(){} /* do left turn */

    void forward(){} /* go forward 1 unit */

    void backward(){} /* go backward 1 unit */

    void main(){} /* Call series of directions */

  • For this project the distance to the wall is unknown. A persistent global variable should be declared to calculate the time needed by the robot to travel from start to finish.

Distance algorithm l.jpg
Distance Algorithm

  • The distance from start to finish is roughly 3 cells. So dividing the calibration time by 3.0 should yield the time to travel forward one cell.

  • Turn times should be hard coded

  • ****In addition to the original requirements the robot should be able to circumnavigate the wall with left or right openings.

Wall navigation l.jpg
Wall Navigation

  • When the robot hits the wall it should now implement the following pseudo-code.

    If(hit){ /* test right for opening first default to right state*/



    forward 1 U;


    While (time < 1U){


    if (hit) {

    r_flag = 1 /* indicates no opening at right use left state */



    forward 2 U;





Project 3 the wall6 l.jpg
Project 3: The Wall

  • Basic robot parameters

  • The robot contains two motors and two sensors

  • To go forward both motors should be turned on i.e. fd(0) and fd(1)

  • To go right, the left motor should go forward and the right motor should go backward.

    fd(0); /* left motor forward */

    bk(1); /* right motor backward */

Project 3 the wall7 l.jpg
Project 3: The Wall

  • There are times when a variable power level for the motor is desired. Using the motor() sub-function allows this.

    motor(0,50); /* 50% of power for motor 0 in forward */

    motor(0,-33); /* 33% power for motor 0 in reverse */

  • The usage of sensors is simple just place your sensors connections in a digital port. Operation is the same as before.

  • The motor should be connected as follows on the next slide

Motor connection l.jpg
Motor Connection




Pins 1 and 3 should be connected to the motor.

The bank of pins corresponding to each motor.

Project 3 the wall9 l.jpg
Project 3: The Wall

  • Additional notes

  • Your machine should ONLY require one calibration period to run the course. Hard coding of distances is NOT permitted.

  • The robot should travel the length of the course and store this time as a global variable i.e.

    persistent int a;

  • The robot after determining this value should run the course flawlessly…well maybe…

Project 3 the wall10 l.jpg
Project 3: The Wall

  • This project will require the following.

  • Each design team consisting of 1-2 students should submit a brief 2-3 page report detailing the design and implementation that was chosen.

  • In addition, all C files needed for this project should be well commented and readable.

  • Also each team will be required to show that the design works 3 out of 4 times (this maybe increased) on the course.