# Arm Board Protobuffers

***This page:** *each arm\_board protobuffer explained.**

<p class="callout success"><span style="white-space: pre-wrap;">The protobuffers for the arm\_board are passed between software, control and embedded. </span></p>

---

##### Movement\_software\_target.proto

**Software -&gt; control**

This file contains two protobuffers detailing the source of a movement.

**ArmBoardTargetMovement** contains the target coordinates for a movement. This gets sent to control, they use this information to calculate motor angles.

**ArmBoardObstructions**<span style="background-color: rgb(251, 238, 184); white-space: pre-wrap;"> is a placeholder for now</span>. The idea is that software would be able to pass a list of coordinates of physical obstructions to control, around which they would manoeuvre the movement of the arm.

---

##### Movement\_control\_in.pb.h

**Control -&gt; Embedded**

<span style="white-space: pre-wrap;">After control calculates the angles using the information from the previous protobuf, it sends the control signals back to us (embedded) with the </span><span style="background-color: rgb(248, 202, 198); white-space: pre-wrap;">absolute </span>angles and frequency for the motors.<span style="background-color: rgb(251, 238, 184); white-space: pre-wrap;"> So, this is the information embedded uses to actuate the motors.</span>

**ArmboardControlSignals**<span style="background-color: rgb(248, 202, 198); white-space: pre-wrap;"> contains all the angles the motors need to be turned to</span>. We then use this information to set the PWM pins.

---

##### Movement\_software\_feedback.proto

**Embedded -&gt; Software**

After the movement happens (or fails), embedded will send feedback to software for them to calculate the next movement.

**ArmBoardMovementFeedback** sends an error code to software.

Possible error codes are:

- Point\_not\_in\_range
- Obstruction
- Calibration
- Motor\_malfunction
- All\_ok

**ArmBoardActualPositions** <span style="white-space: pre-wrap;">sends back the angle of each motor of the arm. Software will use this to display a 3D model of the arm position. </span><span style="background-color: rgb(248, 202, 198);">(Allegedly)</span>

---

##### Motor\_diagnostics.proto

**Arm board -&gt; Debugging board**

This protobuf gets periodically sent to the debugging board to indicate the status.

**ArmBoardDiagnostics** <span style="white-space: pre-wrap;">the </span>`<span class="editor-theme-code">MotorInformation</span>`<span style="white-space: pre-wrap;"> for each motor and the state of the </span>**entire** <span style="white-space: pre-wrap;">board. </span>

Possible states are:

- Idle
- Operating
- Calibrating
- Errored

<p class="callout info">**MotorInformation** is a common protobuf shared between all boards that use motors (this and driving board). MotorInformation contains the state (same as above), motor\_id, rpm, voltage and encoder\_angle for a single motor.</p>