|
Explore TEAMS!
|
Student /
Silversnakes![]() Egg Hunt Plan 1: Press advance button to pick color to use 2: Press Play to start the search 3: Drive forward, sweep, find a ball 4: IF the right color, then look for light and push it in, IF the wrong color, dispose of the ball. 5: Repeate 3 - 4 (need 2 servos, 1 to trap the ball in the plow, 2 to lift the plow(shovel)) Flow Chart ![]() Main.c int main(void) { // Allocate memory for sensor data structure
cr8 = cr8_alloc();
/* Initialize the Create and Command Module
Sync communications settings. */
cr8_init(cr8);
// Declare LOCAL constants used in function main:
// For example: const int Pi100 = 314;
// Declare LOCAL Variables used in function main:
// For example: int i, j;
// Initialize LOCAL Variables used in function main:
// For example: i = 1;
Cr8_stopwatch_start() while (Cr8_stopwatch_start() < 200) {
while (safe && Cr8_stopwatch_start() < 200)
{
while (!start() && safe && Cr8_stopwatch_start() < 200)
{
pick_color();
start();
}
Search();
deliver_or_dispose();
}
}
}
program_shutdown(); cr8_free(cr8); return(0); } // End of function main Who did what? Phil: I wrote the part of the program where the robot will make a sweep pattern, using a fluctuating wall following algorith, and look for balls within 20 cm, while differentiating between balls and walls. Finally my part of the program will close the claw on the ball. Anthony: I wrote the part of the program where once we have a ball in the claw, the robot will turn so it is facing the light, and then drive to it, and deliver the ball. Phil + Anthony ![]() Robot Design
|
|||||||