Final Report - Final Report Christina Wong Joulnar Salman...

This preview shows page 1 - 4 out of 6 pages.

Final Report Christina Wong Joulnar Salman Nic Carter Design The design of our robot was to enable as much maneuverability as possible, with a U-shaped trap in the front to funnel the cans into the sensor’s view. Concept The concept of our robot was to move straight and turn randomly and then back up and turn right when the bottom sensor read a black line and when it read a can it was to move forward until it read a black line. Software architecture
Image of page 1

Subscribe to view the full document.

//define motor outputs #define LEFT OUT_C #define RIGHT OUT_A //define threshholds #define BTHRESH 45 #define RTHRESH 35 //define sensors #define REYE SENSOR_1 #define BEYE SENSOR_3 //main task task main() { // configure the sensors SetSensor(REYE, SENSOR_LIGHT); SetSensor(BEYE, SENSOR_LIGHT); // set power levels for both right and left motors SetPower(LEFT,7); SetPower(RIGHT,2); start hunt; start feedback_line; start feedback_can; } //stops hunting for cans when bottom sensor reads the line, backs up, and rotates to the right task feedback_line() { while(true) { if(BEYE<=BTHRESH) { stop hunt; stop feedback_can; OnFwd(LEFT+RIGHT); Wait(50); OnRev(LEFT); Wait(50); start hunt; start feedback_can;
Image of page 2
} } } //stops hunting for cans and takes out a can while making a tone task feedback_can() { while(true) { if(REYE>=RTHRESH) { stop hunt; PlayTone(650,2); OnRev(RIGHT+LEFT); } } }
Image of page 3

Subscribe to view the full document.

Image of page 4

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern