- :-

Topics Covered

  • Remote Control Driving
  • tankControl Block
  • Lesson Links

    Check Your Understanding:
    1. 1. True or False. To remotely control the robot, the tankControl command block must be placed within a loop.
    2. True
    3. 2. Every time that the tankControl command block is run,
    4. the driving motors are set equal to 0.
      the driving motors are set equal to the position values from the joysticks.
      the driving motors are correctly set, as long as the robot is using tank treads.
      The robot spins in place.
    5. 3. To make the robot move forward, both joysticks on the VEX IQ Controller should be pushed:
    6. Forward
      To the Right
      To the Left
    Try It!
    Try it! 1

    Arcade Control

    The arcadeControl command block allows you to use the horizontal and vertical axis of one joystick to control your robot. Try it!
    • Create a program that uses the arcadeControl command block
      instead of the tankControl command block. (Don't forget to place it inside a loop!)

    • Keep Channel A and Channel B set as the joystick channels.

    • Download and run your program, and try controlling your robot using the left joystick.

    • What do you have to do to make the robot move forward? Reverse? Turn to the right? Turn to the left?

    • Which control method: Tank Control or Arcade Control do you find more intuitive? Feel free to use the more intuitive method in your programs!
    What happens?
    The backward command makes the robot move backward instead of forward, using the exact same command details as the forward movement.
    Try it! 2

    RepeatUntil Timer Value

    Having a remote controlled competition with your classmates is a lot of fun, but to be fair, everyone should get the same amount of time to drive their robot.

    Download and run the starter program on the right (RepeatUntilTimerTryit.rbg), which allows you to control the robot for a certain amount of time before the program ends. Try it!

    • Download the .rbg file linked on the right corner of this activity.
      ( RepeatUntilTimerTryitVR.rbg and RepeatUntilTimerTryit.rbg )
      then run it on your robot.

    • The program that you downloaded and ran uses the robots internal timers to keep track of how long the repeatUntil Loop Block should repeat the remote control commands.

      You can think of the internal timers like stopwatches. There are four internal timers: T1, T2, T3, and T4.

    • The resetTimer command block clears the timer, so that it starts counting at 0.

    • The condition of the loop block "getTimer(T1, seconds) >= 60" retrieves the value of timer T1, in seconds,
      and allows the loop to repeat until 60 seconds have elapsed.
    Did You Know?

    Did you know?

    Running Remote Control Programs
    Remote Control programs will appear under the "Auto Pgms" section of the VEX IQ Brain.
    In order for you to run them, select "Auto Pgm" placed below "TeleOp Pgms".

    Did you know?

    Joystick Sensitivity
    If you find that the joysticks are too sensitive when you are driving the robot,
    they can be adjusted with the setJoystickScale command block in ROBOTC.
    The setJoystickScale command block allows you to scale the position values that come out from the joysticks before they are applied to the driving motors.
    In this example: The setJoystickScale command block is placed once, at the beginning of the program, and set to a value of 50.

    This changes the range of joystick position values applied to the motors
    from -100 and +100 to -50 and +50 for the entire program.

    When the joysticks are pushed fully forward, the motors will be driven at motor speed 50.
    When they are pushed fully down, the motors will be driven at motor speed -50.

    Did you know?

    Drivetrains with More Than 2 Motors
    The tankControl and arcadeControl command blocks will allow you to drive more complicated robots, that have more than 2 driving motors, if you configure your robot in the Motor and Sensor Setup.
    Open the Motor and Sensor Setup by clicking on the "Motors and Sensor Setup" button at the top of ROBOTC.
    On Motors and Sensors Setup window, click and open the "Motors" tab
    On the Motors tab, configure where you have motors plugged in on the robot,
    and be sure to specify which "Drive Motor Side" the motors are on.

    Below is an example:
    For a reminder on working with the Motor and Sensor Setup window,
    you can watch the Motor and Sensor Setup video in the Setup section of the curriculum.