70 likes | 175 Views
MEET (BC)² (GROUP #3). Members ( from left to right ): Rachel Bevill , Brae Bower, Samantha Cherbonneau , Professor Ahmadi , Anthony Contreras. PROJECT OBJECTIVE. 2m. 2m. 2m. 2m. D esign a robot that will move along a specific path, guided by rear wheels and front sensors
E N D
MEET (BC)² (GROUP #3) Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras
PROJECT OBJECTIVE 2m 2m 2m 2m • 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 Finish 2m 2m Start 2m 2m
PROGRAM CODE FOR THE BATMOBILE 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 && sensor4>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 }
CENTRIFUGE EXPERIMENT • Design, build, code, and gather data from a centrifuge
CENTRIFUGE PROGRAM CODING 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)); } } } }
ECE LAB RESULTS • Learned to code programs through Interactive C • Observed the importance of trial and error • Developed stronger communication skills • Discovered the importance of teamwork