OnBot Java (FTC)

navX2-Micro can be programmed using FTC OnBot Java.

Note that OnBot Java does not allow custom libraries to be downloaded and used on a FTC robot; if the advanced features (like the NavX PID controller) of the navX2-Micro Android Library are desired, the Android Studio programming model must be used.

Accessing OnBot Java

To access navX2-Micro from FTC OnBot Java, use a web brower to open the OnBot Java Web Editor page. The URL for this is:

<ip_address_of_robot_controller_phone>:8080

For example, if the robot controller phone’s IP address is “10.11.12.13”, the URL would be:

http://10.11.12.13:8080

Creating an OpMode to access navX2-Micro

Once the OnBot Java Editor is opened, click on the “Add File” icon:

Then, select the SensorKLNavxMicro sample as the template for your code:

Once the new java code file is created, the default device name in the initialization code is set to “navx”:

This name in code must match the “Device name” for the navX2-Micro device in the active Robot Configuration. For more details on how to configure the navX2-Micro Device name, see FTC Robot Installation.