FTC Just Enough Android Studio 20220223

From wikidb
Revision as of 12:18, 25 February 2022 by Edc (Talk | contribs)

Jump to: navigation, search

Strategy

  • Assure that the training robots are configured correctly for the tutorials
  • Introduce a Happy Path to starting a project. This is not by any means a complete tutorial.
  • Best Known Methods (BKM) are critical and are guided by the individual FTC teams. BKMs advice will be integrated into my material but core Java skills will be the focus.

Download a project from GitHub

  • Set up a GitHub account

Add an Op Mode

  • click on org.firstinspires.ftc.teamcode folder which is itself in the TeamCode/java in the Project view
    • File menu
      • New item
        • Java Class - at the top of the list
          • Type in the class name TestMotorEpp select Class Name
            • answer the GitHub question
            • find the class in the TeamCode of the project and enter your code
  • Paste the downloaded code into the newprograms

Demo Program

Drive the motors forward until stop press or for 30 seconds.

Run

Pressing Run (right pointing green triangle) and be excited when it works

The Configuration File

Connection Details

Creating a Configuation File Using the Driver Station

  • Section 9.4

MiniBot Kit

Example

  • name: OrRAS
    • Webcam 1: 9BB6F610
    • Control Hub Portal: embedded
      • Control Hub
        • Motors
          • 0: REV Robotics Core Hex Motor: myLeftMotor
          • 1: REV Robotics Core Hex Motor: myRightMotor
        • I2C Bus 0
          • REV Expansion Hub IMU: imu

Build Project

  • Green right pointing triangle - Run your code
  • Red square -

Modify and Build

Code Walk Through

  • Telemetry
  • ...

Exercises

  1. Download the TestMotorEpp.java program from Github and test it.
    1. Be sure the xxx file is configured correctly
    2. Watch your fingers, shirt sleeves and hair - the motors have a lot of pull and the gears are sharp
  2. Remove the incorrect comment:
    1. Commit
    2. Push
    3. Set up your own GitHub repository and push it there
  3. Convert the program from its linear to iterative version
    1. Basic OpMode Iterative

References