> For the complete documentation index, see [llms.txt](https://docs.plummerindustries.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plummerindustries.com/electronics/analog-sensor/theta-an-analog-output/integrating-with-robot.md).

# Integrating with robot

## Using a motor controller

### Spark Max

{% stepper %}
{% step %}

### Wiring&#x20;

Using a 10 pin data cable connect the data port on the theta to the data prot on the spark max.&#x20;
{% endstep %}

{% step %}

### Programming

Pull in your values using the spark max SparkBase.getAnalog() function. To get the correct value in degrees you need to set the conversion factor properly. To calculate this use (360.0 degrees / 3.3 volts). This will give you a (109.09)degrees per volt conversion factor.&#x20;

More info can be found here. [LINK](https://codedocs.revrobotics.com/java/com/revrobotics/spark/sparkanalogsensor)
{% endstep %}
{% endstepper %}

### Talon FXS

{% stepper %}
{% step %}

### Wiring&#x20;

Using a 10 pin data cable connect the data port on the theta to the data port on the Talon FXS
{% endstep %}

{% step %}

### Programming

Pull in your values using the Talon FXS talonFXS.getAnalogVoltage(); function. To get the correct value in degrees you need to multiply this value by a factor. To calculate this use (360.0 degrees / 3.3 volts). This will give you a (109.09)degrees per volt conversion factor.&#x20;

More info can be found here. [LINK](https://codedocs.revrobotics.com/java/com/revrobotics/spark/sparkanalogsensor)
{% endstep %}
{% endstepper %}

## Directly to RIO&#x20;

{% stepper %}
{% step %}

### Wiring

Using the 3 pin Molex SL connector on the THETA make or use a 3 wire cable and plug it into the anaolg ports on the Robo Rio
{% endstep %}

{% step %}

### Programming

Pull your values into code using the m\_analog.getAverageValue() call. After you set up the port with AnalogInput m\_analog = new AnalogInput(0);&#x20;

More info can be found here. [LINK](https://docs.wpilib.org/en/stable/docs/software/hardware-apis/sensors/analog-inputs-software.html)
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.plummerindustries.com/electronics/analog-sensor/theta-an-analog-output/integrating-with-robot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
