# 微動感應器

## **什麼是微動感應器** <a href="#what-is-micro-switch" id="what-is-micro-switch"></a>

![](https://3604010070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMkf3T5TFv8DQHoxabU%2F-LylHkV3evRIeOAeSK8o%2F-LylHuKhCfVHtudPH_Wl%2Fimage.png?alt=media\&token=96f8a144-3207-4932-a6f9-27934ca00caf)

微動感應器是一種尺寸很小而又非常靈敏的彈簧引開關，微動感應器大多安裝在按鍵式機構下，其原理是當按鍵被按壓時，微動感應器內的金屬彈簧片就會被觸發，改變電子零件的信號傳遞。

FlipRobot的微動感應器沒有按壓時，不會產生訊號(即0)；按壓時，產生訊號(即1)。

## **微動感應器的應用** <a href="#applications-of-micro-switch" id="applications-of-micro-switch"></a>

下面的程式範例將實作微動感應器的感測。

如下圖，微動感應器回傳的偵測數值(透過下圖中藍色程式積木可以得到回饋的數值)等於0(即沒有按壓微動感應器)的條件成立時，執行前進的功能，否則執行右轉的功能(表示微動感應器被按壓，其偵測的數值等於1)。

![](https://3604010070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMkf3T5TFv8DQHoxabU%2F-LRoxO3Ok3zUAYXoMzVW%2F-LRoxBdTRNbc_dldvd-z%2Fimage.png?alt=media\&token=39ad667c-0fde-4323-9029-43c1ad104abf)


---

# 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://fliprobot.gitbook.io/knowledge-base/sensory-system-of-fliprobot-sensor-modules/micro-switch-sensor.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.
