EV3 Program List
Naming Programs:
Name programs as follows:
P (period number) R ( robot number) + program name
example: P1R8 one rotation would be the correct name for period 1, robot 8 program named "one rotation".
In order to receive credit:
Program must be named correctly
Program must be downloaded and previously tested by student
Program must work correctly
Program is up/visible on computer screen so I can see it as the robot performs
Programs and what they should do:
P_R_ one rotation
Robot moves forward for one rotation of both wheels when center button is pressed.
Click the button above for help
P_R_ 720 turn
Robot turns by moving the left motor (B) 720 degrees.
Click the button above for help
P_R_ touch 360 <-- Click the link for help
Robot moves forward 360 degree turn of both wheels when touch sensor is pressed.
If finished : Create your own stacks.
Use either the touch sensor or the light sensor or both and see what you can get your robot to do when the sensors are activated
P_R_ moves plus
forward 50 cm
wait 1 sec
backward 20 cm
wait 2 sec
turn right 90 degrees
make a sound
make a second, different sound when touch sensor is pressed
P_R_ Back moves
Robot moves forward exactly 55cm, wait one second , then backward 20 cm
P_R_back square
move backward 30cm
wait 1 sec
turn left 90 degrees (make a right angle)
repeat this move until the robot has traveled in a square and ends up in the same position it started
Ultrasonic (click link for help)
START POSITION: Robot can be placed at any random distance greater than 15 cm from a wall. ** Ultrasonic sensor on the FRONT must be at least 15 cm away from the wall.**
Robot begins moving when touch sensor is pressed.
Robot moves forward until it is 15cm from the wall.
Stop and wait 1 sec
Move backward until robot is 25 cm from wall. ** You MUST use your ultrasonic sensor for this move.**
RECOMMENDATIONS: Do not use the =
Use the > and the <. If the robot is moving quickly, it may pass the desired distance before registering that it is “=” to the distance. If the robot is moving forward to a desired distance of 15 cm from an object. It should stop as soon as it reaches the smallest distance under 15 if you use “<15”, so it should virtually stop at 15.
How to get to BUILD INSTRUCTIONS for Ultrasonic Sensor:
Open the EV3 Classroom App
Go to "home". If you are already in the app, it is the little house-shaped icon
Go to "Unit Plans"
Go to "Robot Trainer" - (you may have to download it)
Scroll down and click on "Objects and Obstacles"
Look for the panel of instructions on the far right of the screen. Locate the Circle with the right-pointing arrow - click it.
Choose "build"
Choose "Ultrasonic Sensor Driving Base"
P_R_My Ultra
START POSITION: Robot starts facing the wall, any distance within 10 cm.
Robot backs up until it is 28 cm from the wall and stops **you MUST use your ultrasonic sensor for this**
wait 1 sec
Robot turns 90 degrees to the left
wait 1 sec
Robot backs up 10 cm **you will not be able to use your ultrasonic sensor for this **
wait 1 sec
Robot turns 90 degrees to the right
wait 1 sec
Robot moves forward until it is 10 cm from the wall **you MUST use your ultrasonic sensor for this**
If finished
P_R_keep distance
Program your robot to stay 15 cm away from your hand:
If you move your hand closer, it should back up.
If you move your hand away, it should follow.
P_R_ Objects <-- click this link for help
Robot can be placed at any random distance greater than 30 cm from a wall
Robot approaches the wall and makes different beeps as it gets closer to the wall.
IMPORTANT: the loop is necessary so that the robot is continually checking for distance. If you do not use the loop, it will make one instantaneous check with the sensor and never check again. It’s like asking you to open your eyes once to look, then close them and not open them again.
Or, if finished
P_R_ Song
Set your robot to play different notes at different distances and see if you can get it to play a song
HINT: requires either a loop or simultaneous stacks.
P_R_ Grab - for this you will need to have or to build the arm in the front. For instructions, do the following:
P_R_ Grab <-- click this link for help
Robot approaches block.
Robot stops just in front of block. (no closer than 5cm)
Robot grabs block with arm.
Robot retreats (goes backward) for two rotations of both wheels.
NOTE: ultrasonic sensor often has difficulty detecting distances less than 5 cm, so I do not recommend using distances less than 5 cm.
NOTE: If you ask the motor arm to turn farther than it is actually able to turn, it will not complete the command, which means it will not move on tot he next command, which means it will just get stuck and will not continue with any other commands.
Robot approaches block.
Robot stops just in front of block. (no closer than 5cm)
Robot grabs block with arm.
Robot waits one second
Robot retreats (goes backward) for two rotations of both wheels.
Wait 1 second
Robot turns around 180 degrees.
Wait one second
Move forward 15cm
Release object.
Back up 1 rotation.
P_R_ Return Grab - for this you will need to have or to build the arm in the front. For instructions, do the following:
** This one is challenging. You will need to use variables, which we have not yet discussed. Try it if you have time.**
Robot approaches block.
Robot grabs block with arm.
Robot retreats to its starting position. **this is the tricky part!
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.
P_R_ Line Follow (click link for help)
Program your robot to follow a black line on the challenge board from a given point to a destination.
**If your light sensor does not appear to be getting accurate readings, it may need to be calibrated.