FIRST RISE powered by Star Wars: Force for Change 2019 ...

FIRST ? RISESM powered by Star Wars: Force for Change

2019-2020 FIRST ? Tech Challenge

OnBot Java Tutorial

2 | FIRST? Tech Challenge OnBot Java Manual

Sponsor Thank You

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

Revision 1: 08/08/2019

FIRST? Tech Challenge OnBot Java Manual | 3

Volunteer Thank You

Thank you for taking the time to volunteer for a FIRST? Tech Challenge event. FIRST? and FIRST? Tech Challenge rely heavily on volunteers to ensure events run smoothly and are a fun experience for teams and their families, which could not happen without people like you. With over 5,500 teams competing yearly, your dedication and commitment are essential to the success of each event and the FIRST Tech Challenge program. Thank you for your time and effort in supporting the mission of FIRST!

Revision 1.0 2.0

Date

Description

09/09/2017 Initial Release

08/08/2019 Control Hub update

Revision History

Contents

Contents ............................................................................................................................................................ 3 1. Introduction................................................................................................................................................. 6

1.1. What is FIRST? Tech Challenge?........................................................................................................ 6 2. Gracious Professionalism? ......................................................................................................................... 6 3. Introduction to OnBot Java Programming ................................................................................................... 7 4. The FTC Control System ............................................................................................................................ 7

4.1. About the FIRST Tech Challenge.......................................................................................................... 7 4.2. Autonomous vs. Driver-Controlled ....................................................................................................... 8 4.3. Point-to-Point Control System ............................................................................................................. 8 4.4. REV Robotics Expansion Hub ............................................................................................................. 9 4.5. REV Robotics Control Hub ................................................................................................................ 10 4.6. What's an Op Mode? ......................................................................................................................... 10 5. Required Materials ................................................................................................................................... 11 6. Using Your Android Device....................................................................................................................... 18 6.1. Unlocking Your Screen...................................................................................................................... 18 6.2. Navigating in Android ........................................................................................................................ 19 6.3. Displaying Available Apps on your Android Phone ............................................................................ 21

6.3.1. Android Marshmallow Users....................................................................................................... 21 6.3.2. Android Nougat Users ................................................................................................................ 22 7. Configuring Your Android Devices ............................................................................................................ 23 7.1. What Needs to Be Configured for My Control System? ..................................................................... 23 7.1.1. Control Hub Users ...................................................................................................................... 23 7.1.2. Users with Two Android Smartphones ........................................................................................... 24 7.2. Renaming Your Smartphones ........................................................................................................... 25 7.3. Installing the FTC Apps ..................................................................................................................... 33

Gracious Professionalism? - "Doing your best work while treating others with respect and kindness - It's what makes FIRST, first."

4 | FIRST? Tech Challenge OnBot Java Manual

7.4. Placing Phones into Airplane Mode with Wi-Fi On............................................................................. 41 7.5. Pairing the Driver Station to the Robot Controller .............................................................................. 43

7.5.1. Control Hub Users ...................................................................................................................... 43 7.6. Users with Two Android Smartphones............................................................................................... 55 8. Connecting Devices to a Control or Expansion Hub ................................................................................. 56 8.1. Connecting 12V Power to the Hub..................................................................................................... 56 8.2. Connecting a Motor to the Hub .......................................................................................................... 60 8.3. Connecting a Servo to the Hub.......................................................................................................... 61 8.4. Connecting a Color-Distance Sensor to the Hub ............................................................................... 63 8.5. Connecting a Touch Sensor to the Hub ............................................................................................. 65 9. Configuring Your Hardware ...................................................................................................................... 67 9.1. Before You Begin... ........................................................................................................................... 67 9.2. Connecting an Android Smartphone to an Expansion Hub ................................................................ 67 9.3. Getting the Control Hub Ready.......................................................................................................... 70 9.4. Creating a Configuration File Using the Driver Station....................................................................... 70 9.5. Configuring a DC Motor..................................................................................................................... 76 9.6. Configuring a Servo........................................................................................................................... 80 9.7. Configuring a Color Distance Sensor................................................................................................. 84 9.8. Configuring a Digital Touch Sensor ................................................................................................... 89 9.9. Saving the Configuration Information................................................................................................. 92 10. Installing a Javascript Enabled Browser ................................................................................................ 99 11. Connecting a Laptop to the Program & Manage Network.................................................................... 101 11.1. Connecting Your Laptop to the Program & Manage Network ....................................................... 101 11.2. Troubleshooting Your Wireless Connection ................................................................................. 108 12. Creating and Running an Op Mode (OnBot Java) ............................................................................... 109 12.1. The Java Programming Language ............................................................................................... 109 12.2. What's an Op Mode? ................................................................................................................... 109 12.3. The FTC OnBot Java Programming Tool ..................................................................................... 109 12.4. Creating Your First Op Mode ....................................................................................................... 111 12.5. Examining the Structure of Your Op Mode ................................................................................... 117 12.6. Building Your Op Mode ................................................................................................................ 120 12.7. Troubleshooting Build Messages ................................................................................................. 121 12.8. Running Your Op Mode ............................................................................................................... 123 12.9. Modifying Your Op Mode to Control a Motor ................................................................................ 127 12.10. Running Your Op Mode with a Gamepad Connected................................................................... 129 13. Controlling a Servo (OnBot Java)........................................................................................................ 132

Revision 1: 08/08/2019

FIRST? Tech Challenge OnBot Java Manual | 5

13.1. What is a Servo Motor?................................................................................................................ 132 13.2. Modifying Your Op Mode to Control a Servo ................................................................................ 133 14. Using Sensors (OnBot Java)............................................................................................................... 136 14.1. Color-Distance Sensor ................................................................................................................. 136 13.2. Touch Sensor .............................................................................................................................. 136 15. OnBot Java Reference Info ................................................................................................................. 138 15.1. Javadoc Reference Pages ........................................................................................................... 138 15.2. Sample Op Modes ....................................................................................................................... 138 15.3. Technology Forum ....................................................................................................................... 139 15.4. REV Robotics Expansion Hub Documentation ............................................................................. 139 16. Appendix A ? Resources..................................................................................................................... 140 Game Forum Q&A ..................................................................................................................................... 140 FIRST Tech Challenge Game Manuals...................................................................................................... 140 FIRST Headquarters Pre-Event Support .................................................................................................... 140 FIRST Tech Challenge Event On-Call Support .......................................................................................... 140 FIRST Websites......................................................................................................................................... 140 FIRST Tech Challenge Social Media ......................................................................................................... 140 Feedback ................................................................................................................................................... 140

Gracious Professionalism? - "Doing your best work while treating others with respect and kindness - It's what makes FIRST, first."

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

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

Google Online Preview   Download