P_R_ Grab 

You will need this motorized arm for the next set of programs.

EV3 Robot Trainer Tutorials:

Grab 

First, you will need to build the arm attachment if it is not already built. 

See link above...


Goal: Program the driving base to use the ultrasonic sensor to stop near the cuboid and then lower the arm to collect the cuboid and back up for two rotations of both wheels.


Look at the stack below and read the descriptions for each block to understand how it works.

P_R_ Grab : copy the stack below EXACTLY


NOTE!!

Default motors for pink MOVEMENT blocks are always B and C. Make sure your motors are plugged into the correct ports.


WAIT does not mean stop. It means that the robot must NOT go on to the next command until the “wait” condition is met. In the case above, the robot is to continue moving forward until it senses an object less than 5 cm ahead of it.


The ultrasonic sensor has some difficulty sensing distances less than 5cm, so you may not want to put a value less than 5 in the sensor block.


The blue MOTOR block commands the motor plugged into port A to move 130 degrees. You may need to adjust this. Make sure the arm attached to that motor CAN actually move that far without getting stuck on the body of the robot. If you command the motor to move more than it is physically able to move, the arm will get stuck, the robot will CONTINUE to try to complete the command and WILL NOT continue to the next command until it can complete the one it is running.


The final MOVEMENT block shows a negative speed (-50%). This commands the robot to move BACKWARD. 

Your Tasks:


P_R_ Grab : copy the stack above EXACTLY


P_R_ Return Grab: 

Robot can be placed at any random distance from the cuboid.

Robot advances and stops in front of the cuboid.

Robot puts arm down over the cuboid and backs up to the robot's starting point.

Robot turns around 180 degrees and then lifts the arm.


If you are finished:

P_R_ Sing Grab:

Robot can be placed at any random distance from the cuboid.

Robot beeps as it advances toward the cuboid.

Robot beeps faster as it gets closer to the cuboid.

Robot stops in front of the cuboid.

Robot puts arm down over the cuboid and backs up to the robot's starting point.

Robot turns around 180 degrees and then lifts the arm.

Robot sings a song of victory - interpret this step as you wish.