---
updatedAt: 2025-11-11T01:52:45.000Z
agentTools:
  projectIndex: https://docs.formant.io/llms.txt
---

# Teleop Button Status

## Teleop Button Status

A teleop button is a special type of button that comes packaged with a boolean-controlled indicator light. For example, in this EStop button below, we've configured the light on the bottom edge of the button will turn blue when the EStop is engaged.

<Image title="Screenshot 2023-01-16 at 7.26.17 PM.png" alt={292} align="center" width="auto" src="https://files.readme.io/6c5bcb8-Screenshot_2023-01-16_at_7.26.17_PM.png">
  Toggled Off
</Image>

<Image title="Screenshot 2023-01-16 at 8.03.26 PM.png" alt={324} align="center" width="auto" src="https://files.readme.io/78b9d03-Screenshot_2023-01-16_at_8.03.26_PM.png">
  Toggled On
</Image>

The status of this light can be tied to a ROS topic or the API. In this overview, we'll look at using the Agent SDK to set the status of this button.

After adding a button with the API, the name you give to the button will be the name you reference in your skit. For the above button, we've titled it `ESTOP`, so in our API, it will be referred to it as the string `"ESTOP"`.

To toggle the status on and off, we must send a bitset via the API. Here's an example code to toggle the above button:

```python
import time
from formant.sdk.agent.v1 import Client as FormantClient

toggle = True

if __name__ == "__main__":
    fclient = FormantClient(
        ignore_throttled=True,
        ignore_unavailable=True
    )

    # Toggles enabled status of API "testbtn" every second
    while True:
        print("toggling testbtn status")
        fclient.post_bitset(
            "Buttons",
            {
                "ESTOP": toggle,
            },
        )
        time.sleep(1)
        toggle = not toggle
```

<Callout icon="👋" theme="default">
  ### If you notice an issue with this page or need help, please reach out to us! Use the 'Did this page help you?' buttons below, or get in contact with our Customer Success team via the Intercom messenger in the bottom-right corner of this page, or at [support@formant.io](mailto:support@formant.io).
</Callout>