# \[햄스터로봇] 불빛 설정하기

### 코드

```
@햄스터 불빛 (값) 설정하기
```

***

### 설명

* 햄스터로봇의 LED 상태를 설정할 때 사용해요.
* 숫자 1개를 넣으면 양쪽 LED가 같은 색으로 설정되고,\
  리스트 `[왼쪽, 오른쪽]` 형태로 넣으면 좌우를 다르게 설정할 수 있어요.

  <table><thead><tr><th width="183.88897705078125">번호</th><th>색상</th></tr></thead><tbody><tr><td>0</td><td>꺼짐</td></tr><tr><td>1</td><td>파랑</td></tr><tr><td>2</td><td>초록</td></tr><tr><td>3</td><td>하늘</td></tr><tr><td>4</td><td>빨강</td></tr><tr><td>5</td><td>자홍</td></tr><tr><td>6</td><td>노랑</td></tr><tr><td>7</td><td>흰색</td></tr></tbody></table>

***

### 주의사항

* 잘못된 값은 LED가 변경되지 않을 수 있어요.
* 숫자 범위는 `0~7`이에요.
* 범위를 벗어난 값은 `0~7` 범위로 자동 보정돼요.

***

### 파이썬 대응 코드

```
hamster.leds(Hamster.LED_BLUE)
```

***

### 예시

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

```
@햄스터 불빛 1 설정하기
```

{% endcode %}

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

```
(햄스터로봇 LED 상태가 파란색으로 바뀌어요.)
```

{% endcode %}

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

```
@햄스터 불빛 [5, 6] 설정하기
```

{% endcode %}

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

```
(햄스터로봇 LED 상태가 왼쪽은 노란색, 오른쪽은 자홍색으로 바뀌어요.)
```

{% endcode %}

***

### 검색 키워드

햄스터로봇, LED, 불빛 제어


---

# 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/undefined/undefined-5.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.
