Programming Your V5 Controller

Rocket League Competition: (Mobile) (You Tube)
Students will learn how to program their Controllers so that they can have their Robots compete in Rocket League, a competition in which the students have their robots shoot balls into the opposing team's goals. Rules

Note: Normally we use "Drivetrain" and not "Motors" when programming motion. I am asking you to use "Motors" instead of "Drivetrain" in this one instance where we are learning how to program the "Controller." When you complete this assignment and I sign off, then you have the choice of using Motors or Drivetrain as you prepare for the competition.  

 1. Controller Programming  Gradesheet - "Rocket League Challenge."
This Gradesheet will explain what you need the Controller to do.  Grade Sheet.    

2. Controller Programming Guide:
The following Step-By-Step Guide shows you how to Select A Device (eg. Controller) and how to configure the Buttons on the Controller. Click Here.

3. My Controller Programming Hints! 
   The image below shows the Devices you will need to activate in order to successfully meet all the points required on the Rocket League Challenge Gradesheet.
Note: After you finish programming your controller and you find that it does not function correctly, check to make sure that the port that the motor is connected to on the Brain matches the port number you selected for the motor in the Device Window.

How Do I Program My Controller:

Helpful Hint: In order to save time... "Copy&Paste" the code from one program you write to another...just click on the segment of the code you would like to copy, then select "Control" "C" - open the new program and "Control" "V". It will appear!

Set Motor Velocity for a "Motor" gives two options: 

 

First, use this code    to have your robot move. Notice in the program that you must always "Set" the Motor before having it "Spin". This program below will allow the robot    to move robot forward and backward when the left joystick is pressed in the #3 direction . This program below will allow the robot to turn when the right joystick is pressed in the #1 direction . Note: Insert your commands into a Forever Loop so that your robot's motion can function at all times. (This is just a model, your program may be different depending on the numbered ports you declared and to which motors they are connected to.)     

Notice how the forward and backward motion does work when the left joystick is pressed and the robot does turn when the right joystick is pressed, BUT, they do not work when used in the same program.

See if you can repair it.

 Now try this code. It is known as a "Tank" motion program and  it will work. it will allow the robot to move forward and backward with the left joystick and the robot will be also able to turn with the right joystick.

 

 Use this code to get the robot arm to go up and down and claw to open and close. You need  to write an If/Then statement for each of these actions. Place them in the Forever Loop that you created above.

Downloading This New Program Into My Controller:

How Do I Stop My Robot Arm From Descending and Claw from Releasing?