# \[아두이노] 자이로 센서 코드

### 코드

```
@아두이노 가속도 읽어오기 / 가져오기
@아두이노 X축 가속도 읽어오기 / 가져오기
@아두이노 Y축 가속도 읽어오기 / 가져오기
```

***

### 설명

<mark style="color:purple;">`가속도 읽어오기`</mark>는 아두이노와 연결된 자이로 센서(기울기 센서)로부터 물체의 회전 속도나 기울기 데이터를 읽어오는 코드예요. 주로 물체의 균형을 잡거나 움직임을 감지할 때 사용해요.

***

### 주의사항

* 자이로 센서는 주로 I2C 통신을 사용하므로, 아두이노의 지정된 I2C 핀(보통 A4: SDA, A5: SCL)에 연결해야 정확한 데이터를 받을 수 있어요.
* 센서가 작은  흔들림에도 민감하게 반응해요.

### 파이썬 대응 코드

아두이노 코드는 파이썬에 대응되는 코드가 없어 제공되지 않아요.

***

### 예시

{% code title="예시 코드" %}

```
@아두이노 가속도 읽어오기 보여주기
@아두이노 X축 가속도 가져오기 보여주기
@아두이노 Y축 가속도 읽어오기 보여주기
```

{% endcode %}

{% code title="예시 코드의 결과" %}

```
[0, 0]
0
0
```

{% endcode %}

***

### 검색 키워드

자이로 센서, 가속도 센서, 흔들림 센서, 기울기 센서


---

# 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://codebook.horang.it/arduino/undefined.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.
