> For the complete documentation index, see [llms.txt](https://sharinghub.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub.kittenbot.hk/kits/future_inventor/instructions/welcome.md).

# 迎賓機械人

模擬商店歡迎顧客，當檢測到有人靠近時自動揮手並發出聲效歡迎顧客。

![](https://kittenbothk.readthedocs.io/en/latest/_images/welcome1.jpg)

### 組裝說明書

[組裝說明書下載](https://github.com/kittenbothk/kittenbothk/raw/master/Kits/future_inventor/instructions/pdf/welcome.pdf)

### 參考接線

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

### 參考程式

#### KittenBlock參考程式

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

[參考程式下載](https://github.com/kittenbothk/kittenbothk/raw/master/Kits/future_inventor/instructions/sb3/welcome.sb3)

#### Python參考程式

```
#/bin/python

from time import sleep
from future import *
from sugar import *
import robotbit

x = 0
y = 0


def detect():
  global x,y

  if PIR("P0").value():
    if TOFDistance().value() < 300:
      x = TOFDistance().value()
      sleep(1)
      y = TOFDistance().value()
      if x > y:
        welcome()



def welcome():
  global x,y

  buzzer.melody(CORRECT)
  screen.fill((0, 119, 255))
  screen.textCh("歡迎光臨",30,50,2,(255, 255, 255))
  screen.refresh()
  for count in range(3):
    robot.geekServo2kg(1, 90)
    sleep(0.2)
    robot.geekServo2kg(1, 0)
    sleep(0.2)
  screen.clear()



robot = robotbit.RobotBit()

robot.geekServo2kg(1, 0)

while True:
  detect()
```

[參考程式下載](https://github.com/kittenbothk/kittenbothk/raw/master/Kits/future_inventor/instructions/py/welcome.py)

### 模型玩法

有人走過的時候，模型會揮手歡迎。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://sharinghub.kittenbot.hk/kits/future_inventor/instructions/welcome.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
