# 未來板引腳KittenBlock編程教學

## 未來板引腳KittenBlock編程教學

可以利用未來板上的引腳連接各種感應器。

![](https://kittenbothk.readthedocs.io/en/latest/_images/pins1.png)

![](https://kittenbothk.readthedocs.io/en/latest/_images/kbbanner10.png)

### 引腳積木塊

![](https://kittenbothk.readthedocs.io/en/latest/_images/gpio.png)

#### 範例程式：讀取模擬引腳

未來板讀取模擬數值的解析度為10位或12位，數值範圍分別為0\~1023和0\~4095。

![](https://kittenbothk.readthedocs.io/en/latest/_images/gpio_code1.png)

#### 範例程式：寫入模擬數值

![](https://kittenbothk.readthedocs.io/en/latest/_images/gpio_code2.png)

#### 範例程式：讀取數位引腳

![](https://kittenbothk.readthedocs.io/en/latest/_images/gpio_code3.png)

#### 範例程式：寫入數位數值

![](https://kittenbothk.readthedocs.io/en/latest/_images/gpio_code4.png)


---

# 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://sharinghub.kittenbot.hk/mcu/futureboard/kittenblock/pins.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.
