200 && sensor4<200) //if sensor 4 on white and sensor 3 on black then turn left {printf ("\n left"); ao(); motor (1,-30); motor (3,60);} else if (sensor3>200 && sensor4>200) //if both on black do a u-turn {ao(); motor(1,60); motor(3,-60); sleep(.68); I++;} //add to I count once completed } ao(); //once count has reached 2 turn all motors off }"> 200 && sensor4<200) //if sensor 4 on white and sensor 3 on black then turn left {printf ("\n left"); ao(); motor (1,-30); motor (3,60);} else if (sensor3>200 && sensor4>200) //if both on black do a u-turn {ao(); motor(1,60); motor(3,-60); sleep(.68); I++;} //add to I count once completed } ao(); //once count has reached 2 turn all motors off }">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras.

Similar presentations


Presentation on theme: "Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras."ā€” Presentation transcript:

1 Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras

2 Design a robot that will move along a specific path, guided by rear wheels and front sensors Implement a program that codes for the forward movement of the robot along a black curved line, the execution of a U-turn at the end of the line, following the path back to the start 2m Start Finish

3 void main() { int sensor3 = analog(3); int sensor4 = analog(4); int I=0; while (start_button()==0); while (I<2) //repeat until I is less than two { sensor3 = analog(3); sensor4 = analog(4); printf("\n L: %d, R: %d", sensor3, sensor4); if (sensor3<200 && sensor4<200) //both sensors are on white { printf ("\n F"); motor(1,20); motor(3,20);} else if (sensor3 200) //if sensor 3 on white and sensor 4 on black then turn right {printf ("\n right"); ao(); motor (1,60); motor(3,-30);} else if (sensor3>200 && sensor4<200) //if sensor 4 on white and sensor 3 on black then turn left {printf ("\n left"); ao(); motor (1,-30); motor (3,60);} else if (sensor3>200 && sensor4>200) //if both on black do a u-turn {ao(); motor(1,60); motor(3,-60); sleep(.68); I++;} //add to I count once completed } ao(); //once count has reached 2 turn all motors off }

4

5 Design, build, code, and gather data from a centrifuge

6 void main() { int speed = 0; float separation_time=1.0; float ramp_time=0.5; while (start_button()== 0) {printf("\nPress start to begin");} while (start_button() == 1) { while(1) {sleep(3.0); printf("\n mixed value=%d", analog(6)); {motor(3,40);//ramping up sleep(2.0); motor(3,60); sleep(2.0); motor(3,80); //ramped up sleep(2.0); motor(3,100); //full speed sleep(12.0); motor(3,80); //ramping down sleep(2.0); motor(3,60); sleep(2.0); motor(3,40); sleep(2.0); motor(3,0); sleep(9.0);} //ramped down ao(); while (1) { sleep(3.0); printf(ā€œ\n water value=%dā€, analog (6)); } while (1) { sleep(3.0); printf(ā€œ\n oil value=%d, analog(6)); }

7 Learned to code programs through Interactive C Observed the importance of trial and error Developed stronger communication skills Discovered the importance of teamwork


Download ppt "Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras."

Similar presentations


Ads by Google