# 引脚控制

## 简介

实现引脚控制的第一步是定义引脚，这一步使用 `pinMode()` 函数，这一步决定了该引脚是输入还是输出。

然后我们使用例如 `digitalWrite()` 的函数控制引脚的具体电位。

## 目录

{% content-ref url="/pages/-MUcu6O4ujYjsjwguIsL" %}
[pinMode](/core/io/pinmode.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUd-vhFmQuJGtQCF6fI" %}
[digitalWrite](/core/io/digitalwrite.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUd2YTmWaeDV\_Y2cpCB" %}
[digitalRead](/core/io/digitalread.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUd4AXcLzwo950GJ1U9" %}
[analogWrite](/core/io/analogwrite.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUd96w1G-MajWhcxWE2" %}
[analogRead](/core/io/analogread.md)
{% endcontent-ref %}


---

# Agent Instructions: 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:

```
GET https://arduino.doc.skyone.host/core/io.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
