# Device input ROTARY

`0,INPUT,<index>,<tag>,ROTARY,<inherit>,<options>;`

For a stateful rotary the states have to be defined in the options.

In SPAD.neXt standard UI the rotary is visualized as following (uivalue = 0):

`IMG=svg/rotary.svg`

![](/files/4bWJNT0YzgNJKENXzjvD)

### Available Inherits

|                      |                                                      |                            |
| -------------------- | ---------------------------------------------------- | -------------------------- |
| `SPAD_ENCODER_NOACC` | provide additional Clockwise/Counterclockwise events | Acceleration not supported |
| `<EMPTY/OMITTED>`    | No tuner events                                      |                            |
|                      |                                                      |                            |

### Options

|                                       |                                                                                                         |                                      |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| POS\_NAMES=statename1#statename2#.... | a list of the statenames of the rotary separated by "#" (hash)                                          | POS\_NAMES=OFF#LEFT#RIGHT#BOTH#START |
| POS\_VALUES=val1#val2#val3....        | a list of the statevalues the device will use in the input events of the rotary separated by "#" (hash) | POS\_VALUES=0#1#2#3#4                |
| POS\_UIVALUES=val1#val2#val3....      | the rotation ui values for the states (real rotation = 15\*value degrees)                               | POS\_UIVALUES=-3#0#3#6#9             |
|                                       |                                                                                                         |                                      |

### Sending rotary input updates

`8,<index>,<statevalue>;`

e.g to tell SPAD.neXt that the rotary (index 5 tag E\_MAGNETO) has been changed to BOTH-Position the device will send a

`8,5,3;`

command.\
SPAD.neXt will execute the events

`E_MAGENTO.BOTH`

`E_MAGNETO.TUNER_CLOCKWISE` if previous position was RIGHT and encoder inherit was present

and rotate the UI-representation absolute by 6 \* 15 = 90 degrees


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spadnext.com/extending-and-apis/serial-connection/device-communication-flow/device-config-phase/device-input-configuration/device-input-rotary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
