If you are just starting out, click the '+' (Add File) icon in the top left corner. Enter your new file name, and then choose one of the many samples. If you just want to drive a basic robot, select the "BasicOpMode_Linear" sample. Select the "TeleOp" radio button, and then click "OK".
The sample you chose will be renamed to match the name you entered, and it will appear on the "project files" list in the left pane.
To edit your code, just click on the desired file in the left hand pane, and it will be loaded into this Code Editor window. Make any changes.
Once you are done, click the "Build Everything" icon at the bottom of this pane. This will build your OpModes and report any errors. If there are no errors, the OpModes will be stored on the Robot for immediate use.
There are a range of different samples to choose from. Sample names use a convention which helps to indicate their general, and specific, purpose.
eg: The name's prefix describes the general purpose, which can be one of the following:
- Basic: This is a minimally functional OpMode used to illustrate the skeleton/structure of a particular style of OpMode. These are bare bones examples.
- Sensor: This is a Sample OpMode that shows how to use a specific sensor. It is not intended as a functioning robot, it is simply showing the minimal code required to read and display the sensor values.
- Pushbot: This is a Sample OpMode that uses the Pushbot robot structure as a base.
- Concept: This is a sample OpMode that illustrates performing a specific function or concept. These may be complex, but their operation will be explained clearly in the comments, or the header should reference an external doc., guide or tutorial.
- Hardware: This is not an actual OpMode, but a helper class that is used to describe one particular robot's hardware devices. eg: A Pushbot. Look at any Pushbot sample to see how this can be used in an OpMode. If you add a Hardware sample to your project, you MUST use the identical name.
For more help, visit the FTC Control System Wiki (https://github.com/ftctechnh/ftc_app/wiki)