> For the complete documentation index, see [llms.txt](https://bittle.petoi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bittle.petoi.com/thai-2/5-connect-wires.md).

# 5 🔌 การเชื่อมต่อสายไฟ

## 5.1 เดินสายเซอร์โว

### NyBoard

เชื่อมต่อสายไฟของเซอร์โวเข้ากับพินเซอร์โวของ NyBoard ตามด้านล่าง เป็นไปตามสมมาตรแบบวงกลม สังเกตดัชนีข้ามระหว่างเซอร์โวหัวและขา (1\~7) สงวนไว้สำหรับหุ่นยนต์ในอนาคตของเราที่มีข้อต่อมากขึ้น

![](/files/ORpPOCgWdUJFDYXNymQh)

<figure><img src="/files/ndwgzaoPsHyVwzh0XtCh" alt=""><figcaption><p>Observe the wiring pattern on the board</p></figcaption></figure>

{% hint style="danger" %}
หมายเลขดัชนีของเซอร์โวร่วมไม่มีความสัมพันธ์ที่สอดคล้องกับหมายเลขพิน PWM บนเมนบอร์ด คุณไม่จำเป็นต้องอ่านหมายเลขพินบนบอร์ด PCB
{% endhint %}

สายสีดำ (สาย GND) ควรอยู่ใกล้กับบอร์ด

![](/files/-MTM-WimcJAGGrjcnrOw)

มุมมองด้านล่าง:

![](/files/-MTM-Win_KDbqjJgjyNA)

สอดตัวรับสัญญาณอินฟราเรดไว้ใต้แผ่นหลังเพื่อให้เซ็นเซอร์เปิดรับแสงออกสู่ภายนอก

![](/files/-MTM-Wio4N0I-BzZoewa)

![](/files/-MTM-WipuCZN-A2JuJb8)

ตรวจสอบให้แน่ใจว่าสายไฟเข้าไปในตัวเครื่อง ข้ามคอลัมน์ จากนั้นเสียบเข้ากับหมุดเซอร์โว จัดเรียงสายไฟไม่ให้เข้าไปขวางระหว่างปลั๊กเซอร์โวและโครงตัวเครื่อง NyBoard ควรอยู่ในระดับสี่ความขัดแย้ง ใช้สกรูเกลียวปล่อย M2x8 สี่ตัวเพื่อยึด NyBoard

![](/files/-MTM-Wiq2hlW3IXgI7rm)

เสร็จสมบูรณ์:

![](/files/-MTM-WirguxJis5un9Fx)

![](/files/-MTM-Wisp_7IuDcaDNJk)

### BiBoard

แม้ว่า BiBoard จะมีพินเพียง 12 พิน แต่หมายเลขดัชนีร่วมจะถูกกำหนดค่าตามลำดับเดียวกับ NyBoard การเชื่อมต่อระหว่างเซอร์โวร่วมและพินแสดงในรูปด้านล่าง:

<figure><img src="/files/xJEHFt22U9rfh3JCcoei" alt=""><figcaption></figcaption></figure>

## 5.2 เตรียมการสำหรับการคาลิเบรท

{% hint style="info" %}
เมื่อทำการคาลิเบรท คุณต้องติดตั้งส่วนประกอบส่วนหัวและส่วนขาบนเฟืองของเพลาขาออกของเซอร์โว ไม่จำเป็นต้องใช้สกรู แต่คุณต้องเข้าสู่โหมดการคาลิเบรทก่อนการติดตั้ง มีห้าวิธีในการเข้าสู่สถานะการคาลิเบรท:

* กดแบตเตอรี่ค้างไว้แล้วบู๊ตหุ่นยนต์โดยหันด้านหนึ่งขึ้น มันจะเข้าสู่สถานะการคาลิเบรทโดยอัตโนมัติ ภาพด้านล่างแสดงขาบนและขาล่างที่ติดตั้งหลังจากหุ่นยนต์เข้าสู่สถานะการคาลิเบรท

![](/files/c5tYduIcmQzVP8XBh6bt)

* ใช้แอพมือถือ [**Petoi**](https://docs.petoi.com/mobile-app/app-guide#calibrate-the-joints) เพื่อเข้าสู่หน้าการคาลิเบรท
* ใช้ [**Joint Calibrator**](https://docs.petoi.com/desktop-app/calibrator) ใน **Petoi Desktop App** :
  * หากคุณเชื่อมต่อหุ่นยนต์และคอมพิวเตอร์ด้วยซีเรียลพอร์ตแล้ว หุ่นยนต์จะเข้าสู่สถานะการคาลิเบรทโดยอัตโนมัติเมื่อคุณคลิกปุ่ม "**Joint Calibrator**"
  * คลิกปุ่ม "**Calibrate**" เพื่อเข้าสู่หน้าคาลิเบรท
* ใน [**serial monitor**](https://docs.petoi.com/arduino-ide/calibration-with-arduino-ide) ของ Arduino IDE สามารถพิมพ์  "**c**"
* กดปุ่มคาลิเบรท ![](/files/6DYC8s6tdYsm3Zo9wbBQ)(3,3 - แถวที่ 3 และคอลัมน์ที่ 3) บนรีโมทอินฟราเรดInstall the head
  {% endhint %}

ในสถานะที่เป็นกลางที่คาลิเบรทแล้ว ให้วางหัวให้ใกล้กับแกนกลางมากที่สุดเท่าที่จะเป็นไปได้ และสอดเพลาเซอร์โวเข้าไปในแขนเซอร์โวของคอ

![](/files/BqSXpgkht6ixLWijeWTm)

กดศีรษะลงเพื่อให้แนบกับคออย่างแน่นหนา

![](/files/Jij5SyU9BiSlDoHYzGuf)

### ติดตั้งขา&#x20;

ติดตั้งชิ้นส่วนขาบนและขาล่างเข้ากับฟันขาออกของเซอร์โวเมื่อเปิด Bittle และอยู่ในตำแหน่งที่เป็นกลางที่ปรับเทียบแล้ว โปรดให้ลำตัว ขาท่อนบน และขาท่อนล่างติดตั้งในแนวตั้งให้มากที่สุดเท่าที่จะเป็นไปได้ และอย่าติดตั้งท่อนล่างไปข้างหลังดังที่แสดงในภาพ

![](/files/NVukKY66yYdaVlFtGoBQ)

การวัดและการติดตั้งสามารถทำได้โดยใช้ไม้บรรทัดสามเหลี่ยมหรือไม้บรรทัดรูปตัว L ที่รวมอยู่ในชุด

![](/files/ZirDfw8T1IalMHZOISOf)


---

# 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://bittle.petoi.com/thai-2/5-connect-wires.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.
