2021-2022 FIRST Tech Challenge Android Studio Guide

2022-2023 FIRST? Tech Challenge

Android Studio Guide

Electronics Setup to Programming

2 | FIRST? Tech Challenge Android Studio Guide Manual

Sponsor Thank You

Thank you to our generous sponsors for your continued support of the FIRST? Tech Challenge!

Manual | 3

FIRST? Tech Challenge Android Studio Guide

Revision

Date Description

1

08/04/2022 V.1

Revision History

Contents Introduction ....................................................................................................................................................... 6 What is FIRST? Tech Challenge? ..................................................................................................................... 6 Gracious Professionalism? ................................................................................................................................ 6 1. Introduction to Android Studio..................................................................................................................... 7 2. The FTC Control System ............................................................................................................................ 7 2.1. About the FIRST Tech Challenge ...................................................................................................................... 7 2.2. Autonomous vs. Driver-Controlled ..................................................................................................................... 8 2.3. Point-to-Point Control System............................................................................................................................ 8 2.4. REV Robotics Expansion Hub ........................................................................................................................... 9 2.5. REV Robotics Control Hub .............................................................................................................................. 10 2.6. What's an Op Mode? ....................................................................................................................................... 10 3. Required Materials ................................................................................................................................... 11 4. Using Your Android Device....................................................................................................................... 19 4.1. Unlocking Your Screen .................................................................................................................................... 19 4.2. Navigating in Android ...................................................................................................................................... 21 4.3. Displaying Available Apps on your Android Device .......................................................................................... 22 5. Configuring Your Android Devices ............................................................................................................ 24 5.1. What Needs to Be Configured for My Control System?.................................................................................... 24 5.2. Renaming Your Smartphones.......................................................................................................................... 25 5.3. Installing the FTC Apps ................................................................................................................................... 33 5.4. Placing Devices into Airplane Mode with Wi-Fi On........................................................................................... 41 5.5. Pairing the Driver Station to the Robot Controller............................................................................................. 39 6. Connecting Devices to a Control or Expansion Hub.................................................................................. 52 6.1. Connecting 12V Power to the Hub................................................................................................................... 52 6.2. Connecting a Motor to the Hub ........................................................................................................................ 55 6.3. Connecting a Servo to the Hub........................................................................................................................ 56 6.4. Connecting a Color-Distance Sensor to the Hub.............................................................................................. 57 6.5. Connecting a Touch Sensor to the Hub ........................................................................................................... 59 7. Configuring Your Hardware ...................................................................................................................... 61 7.1. Before You Begin... ......................................................................................................................................... 61 7.2. Connecting an Android Smartphone to an Expansion Hub............................................................................... 61 7.3. Getting the Control Hub Ready ........................................................................................................................ 64 7.4. Creating a Configuration File Using the Driver Station ..................................................................................... 64

4 | FIRST? Tech Challenge Android Studio Guide

7.5. Configuring a DC Motor ................................................................................................................................... 70 7.6. Configuring a Servo......................................................................................................................................... 74 7.7. Configuring a Color Distance Sensor ............................................................................................................... 78 7.8. Configuring a Digital Touch Sensor ................................................................................................................. 83 7.9. Saving the Configuration Information ............................................................................................................... 86

8. Installing Android Studio ........................................................................................................................... 93 8.1.1.Android Developer Website............................................................................................................................ 93 8.2. System Requirements ..................................................................................................................................... 93 8.3. Java Development Kit...................................................................................................................................... 93 8.4. Downloading and Installing Android Studio ...................................................................................................... 93

9. Disabling Android Studio Instant Run........................................................................................................ 95 9.1. Introduction...................................................................................................................................................... 95 9.2. Locating Instant Run Settings .......................................................................................................................... 95 9.3. Additional Information ...................................................................................................................................... 97

10. Downloading the Android Studio Project Folder ........................................................................................ 97 10.1.Downloading the Android Studio Project Folder .............................................................................................. 97 10.2.Extracting the Contents of the Archived Project File........................................................................................ 99 10.3.Importing the FTC Project into Android Studio .............................................................................................. 102

11. Enabling Developer Options ................................................................................................................... 104 12. Creating and Running an Op Mode (Android Studio) .............................................................................. 105 12.1.TeamCode Module ....................................................................................................................................... 105 12.2.Javadoc Reference Information..................................................................................................................... 107 12.3.Enabling Auto Import .................................................................................................................................... 107 12.4.Sample Op Modes ........................................................................................................................................ 108 12.5.Creating Your FIRST Op Mode ..................................................................................................................... 109 12.6.Examining the Structure of Your Op Mode .................................................................................................... 111 12.7.Building and Installing Your Op Mode ........................................................................................................... 113 12.8.Running Your Op Mode ................................................................................................................................ 117 12.9.Modifying Your Op Mode to Control a Motor ................................................................................................. 121 12.10.Running Your Op Mode with a Gamepad Connected .................................................................................. 122 13. Controlling a Servo (Android Studio)....................................................................................................... 125 13.1.What is a Servo Motor? ................................................................................................................................ 125 13.2.Modifying Your Op Mode to Control a Servo ................................................................................................. 126 14. Using Sensors (Android Studio).............................................................................................................. 129 14.1.Color-Distance Sensor.................................................................................................................................. 129

Revision 8.4.2022

Manual | 5

FIRST? Tech Challenge Android Studio Guide

14.2.Touch Sensor ............................................................................................................................................... 129 Appendix A ? Resources ............................................................................................................................... 131

Game Forum Q&A ................................................................................................................................................ 131 Volunteer Forum................................................................................................................................................... 131 FIRST Tech Challenge Game Manuals ................................................................................................................ 131 FIRST Headquarters Pre-Event Support ............................................................................................................... 131 FIRST Websites ................................................................................................................................................... 131 FIRST Tech Challenge Social Media .................................................................................................................... 131 Feedback.............................................................................................................................................................. 131

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download