# \[햄스터로봇] 왼쪽/오른쪽 바닥센서

### 코드

```
@햄스터 왼쪽 바닥센서
@햄스터 오른쪽 바닥센서
```

***

### 설명

* 바닥 밝기/라인 상태를 감지할 때 사용하는 센서예요.
* 라인트레이싱 같은 활동에 활용해요.

***

### 주의사항

* 바닥 색상/조도에 따라 값이 달라져요.
* 기준값은 실습 환경에서 직접 측정 후 정하는 게 좋아요.

***

### 파이썬 대응 코드

```
from roboid import *
hamster = Hamster()
while True:
    print(hamster.left_floor(), hamster.right_floor()) # python 3.x.x
    #print hamster.left_floor(), hamster.right_floor() # python 2.7.x
    wait(20)
```

***

### 예시

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

```
왼바닥 = @햄스터 왼쪽 바닥센서
오른바닥 = @햄스터 오른쪽 바닥센서
왼바닥 + "," + 오른바닥 보여주기
```

{% endcode %}

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

```
(햄스터로봇의 현재 좌우 바닥센서 값이 출력돼요.)
```

{% 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/undefined/undefined-4.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.
