> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dairy.foundation/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage

The basic OpMode usage with `Mercurial` looks like this:

<CodeGroup>
  ```java Java theme={null}
  // this enables the scheduler
  @Mercurial.Attach
  // add additional Subsystem attaches
  public class MercurialUsage extends OpMode {
  	@Override
  	public void init() {
  		// modify gamepads

  		// apply bindings
  	}

  	@Override
  	public void loop() {

  	}
  }
  ```

  ```kt Kotlin theme={null}
  // this enables the scheduler
  @Mercurial.Attach
  // add additional Subsystem attaches
  class MercurialUsage : OpMode() {
  	override fun init() {
  		// modify gamepads

  		// apply bindings
  	}

  	override fun loop() {

  	}
  }
  ```
</CodeGroup>

Its not too complicated.

You may find using [OpMode templating](/Core/templating/templating) and writing
[Features](/Core/features/writing_using_features) to help configure the gamepad
and binding setup useful. Also, consider writing static utility methods to
create commands that use multiple subsystems.

Take a look at the examples repo to see an example Subsystem and an example
OpMode with more going on.

[Java](https://github.com/Dairy-Foundation/Dairy/tree/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/examples/mercurial)

[Kotlin](https://github.com/Dairy-Foundation/Dairy/tree/master/TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/examples/mercurial)
