> For the complete documentation index, see [llms.txt](https://dahl-design.gitbook.io/ddc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dahl-design.gitbook.io/ddc/switch-library/pedals-and-paddles/brake-throttle.md).

# Brake/throttle

#### brake()

{% tabs %}
{% tab title="Description" %}
Set up a device that output variable voltages, typically a load cell, hall sensor or potentiometer, to controll the brake joystick axis. Should be wired [like this](/ddc/2.-wiring/analog/analog-wiring.md). It is considered an analog switch, and will have to be assigned a[ switch number](/ddc/1.-project-planning/analog-inputs.md) and you'll have to[ read out](/ddc/1.-project-planning/analog-inputs.md#reading-a-value) some values to [calibrate](/ddc/switch-library/pedals-and-paddles.md) it.&#x20;

Is also available with a [filter](/ddc/switch-library/pedals-and-paddles/filtered-curves.md).
{% endtab %}

{% tab title="Example" %}
`void brake(int analogChannel, int releasedValue, int fullyPressedValue)`

For a potentiometer on analog channel 3 it could look like this:

`brake(3, 0, 1023);`
{% endtab %}

{% tab title="Requirements" %}

* None

{% endtab %}
{% endtabs %}

#### throttle()

{% tabs %}
{% tab title="Description" %}
Set up a device that output variable voltages, typically a hall sensor or potentiometer, to controll the throttle joystick axis. Should be wired [like this](/ddc/2.-wiring/analog/analog-wiring.md). It is considered an analog switch, and will have to be assigned a[ switch number](/ddc/1.-project-planning/analog-inputs.md) and you'll have to[ read out](/ddc/1.-project-planning/analog-inputs.md#reading-a-value) some values to [calibrate](/ddc/switch-library/pedals-and-paddles.md) it.&#x20;

Is also available with a [filter](/ddc/switch-library/pedals-and-paddles/filtered-curves.md).
{% endtab %}

{% tab title="Example" %}
`void throttle(int analogChannel, int releasedValue, int fullyPressedValue)`

For a potentiometer on analog channel 3, it could look like this:

`throttle(3, 0, 1023);`
{% endtab %}

{% tab title="Requirements" %}

* None

{% endtab %}
{% endtabs %}
