> 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/1.-project-planning/switch-inputs.md).

# Switch inputs

When you have an idea of which and how many switches you're going to use, you'll be best of making a plan for your DDC firmware. All the switches should be organized in a **switch table.** No matter how you wire your switches, they will end up in a table in the firmware. And when giving functions and features to your switches, you're be referring to them by their table address; a row and a column number. Or in some cases several column numbers. To make a pushbutton of the switch on row 2, column 3, the code you'll write is `pushButton(2,3);`. More on code later.

Each slot in the table has a package of memory that will be exclusive to the switch using this slot. This memory is used for debouncing algorithms, switch modes and much more. This is why every switch needs to find its place in the table.

Think of it as placing the switches in an Excel sheet. The switch in <mark style="background-color:green;">green</mark> with number "14" is on row 3, column 3. When referring to the switches in the code, you'll be using these addresses. Don't mind the numbers in these cells, more on that later.&#x20;

<figure><img src="/files/YkTHG0Gdz38Vo23eFut9" alt=""><figcaption><p>A matrix, or table if you will, of switches</p></figcaption></figure>

Some exceptions; switches/sensors/potentiometers that require an analog inputs are not part of the table. They are part of the analog input system, built on using [analog channels.](/ddc/1.-project-planning/analog-inputs.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://dahl-design.gitbook.io/ddc/1.-project-planning/switch-inputs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
