# Hooking up External Devices to the E-Stop through Stop Signal

**URL:** https://discourse.farm-ng.com/t/hooking-up-external-devices-to-the-e-stop-through-stop-signal/150
**Category:** support
**Created:** [March 30, 2023, 6:53pm UTC](https://discourse.farm-ng.com/t/hooking-up-external-devices-to-the-e-stop-through-stop-signal/150 "2023-03-30T18:53:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![carlflyons](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.farm-ng.com/carlflyons/32/79_2.png) [@carlflyons](https://discourse.farm-ng.com/u/carlflyons)
#### Post date: [March 30, 2023, 6:53pm UTC](https://discourse.farm-ng.com/t/hooking-up-external-devices-to-the-e-stop-through-stop-signal/150/1 "2023-03-30T18:53:03Z")

</div>

My group’s Amiga add-on has a high-voltage linear actuator that controls the angle of a plow. When operating, our goal is to have the linear actuator shut off with the E-stop when it is pressed without turning off the controlling computer (an Arduino) attached to the system. How are the brain and the camera display told that the E-stop has been pressed? With this information, we could relay that to our linear actuator.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![kylecoble](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.farm-ng.com/kylecoble/32/12_2.png) [@kylecoble](https://discourse.farm-ng.com/u/kylecoble)
#### Post date: [March 30, 2023, 11:03pm UTC](https://discourse.farm-ng.com/t/hooking-up-external-devices-to-the-e-stop-through-stop-signal/150/2 "2023-03-30T23:03:08Z")

</div>

Hi Carl,

You can get the `AmigaControlState` (which includes E-stop state) from the canbus service by parsing the CAN messages that contain an `AmigaTpdo1` message.

The utility `parse_amiga_tpdo1_proto` will filter out all other CAN messages for you, returning either a parsed `AmigaTpdo1` object or `None` for all other CAN messages.

See: [https://github.com/farm-ng/farm-ng-amiga/blob/main/py/farm\_ng/canbus/packet.py](https://github.com/farm-ng/farm-ng-amiga/blob/main/py/farm_ng/canbus/packet.py)

* * *

You can base this off of the `stream_canbus` method in the [Virtual Joystick Tutorial](https://amiga.farm-ng.com/docs/tutorials/virtual_joystick/virtual-joystick-overview).

More specifically, see: [https://amiga.farm-ng.com/docs/tutorials/virtual\_joystick/device-streams#canbus-stream](https://amiga.farm-ng.com/docs/tutorials/virtual_joystick/device-streams#canbus-stream)

Here we display the `AmigaControlState` in a kivy `Label` widget, but you could instead use it to trigger your action.

* * *

> NOTE: The e-stop state can be triggered in the dashboard firmware under other circumstances (e.g., a damaged pendant, a faulty motor controller, etc.), which would appear the same to the brain if you are basing it off of parsed canbus messages. If you want to exclude these e-stop conditions and _ **only** _ look for when the physical e-stop is pressed, you will need some component to detect this electrically and we’ll need support from the hardware team.

– Kyle
