Penalty Kick Robot
Built by Julius Ryan Bagsic, Harshil Thakur, Taylor Green, Jonathan Custodio 
CHALLENGE: Create a robot that can kick a ball towards a chosen position without manual controls
Constraints List:
Use 1 servo
Use 1 motor
Use up to 3 Switches
  Solution statement: Use a servo to set a machine's direction that uses a motor to spin a paddle to kick a ball
All requirements fulfilled

Code Used for Functions:
task main()
{
int armServo=0;
while(1==1){
if(SensorValue[dgtl1]==1){
armServo=armServo+2;
setServo(port2,armServo);
}
if(SensorValue[dgtl3]==1){
armServo=armServo+2;
setServo(port2,armServo);
}
if(SensorValue[dgtl5]==1){
startMotor(kicker,127);
}
if(SensorValue[dgtl5]==0){
stopMotor(kicker);
}
if(SensorValue[dgtl5]==1&&SensorValue[dgtl1]==1&&SensorValue[dgtl3]==1){
stopMotor(kicker);
setServo(port2, 0);
}
}
}

You may also like