|
1 | | -# XiaoZhi Example Project |
| 1 | +# XiaoZhi Sample Project |
2 | 2 |
|
3 | | -[**中文**](./README_zh.md) | **English** |
| 3 | +**中文** | [**English**](./README.md) |
4 | 4 |
|
5 | 5 | ## Introduction |
6 | 6 |
|
7 | | -This example demonstrates the **basic functionality of XiaoZhi voice interaction device** on the **Edgi-Talk platform**, running **RT-Thread RTOS**. |
8 | | -It allows users to quickly test Wi-Fi connection, key wake-up, and voice interaction, serving as a foundation for further application development. |
| 7 | +This sample project is based on the **Edgi-Talk platform**, demonstrating the **basic functions of the XiaoZhi voice interaction device**, running on the **RT-Thread real-time operating system**. |
| 8 | +With this project, users can quickly verify the device’s **WiFi connection**, **button wake-up**, and **voice interaction** capabilities, providing a fundamental reference for further application development. |
9 | 9 |
|
10 | 10 | ## Software Description |
11 | 11 |
|
12 | | -* Developed on **Edgi-Talk** platform. |
13 | | -* Example features: |
| 12 | +* The project is developed based on the **Edgi-Talk** platform. |
| 13 | +* The sample includes the following functions: |
14 | 14 |
|
15 | | - * Wi-Fi connection and status display |
16 | | - * Key wake-up and voice interaction |
17 | | - * Device state management (standby, listening, sleep) |
| 15 | + * WiFi connection and status display |
| 16 | + * Button wake-up and voice interaction |
| 17 | + * Device state management (standby, listening, sleep, etc.) |
18 | 18 |
|
19 | | -## Usage |
| 19 | +# Usage |
20 | 20 |
|
21 | | -### WIFI Modification |
| 21 | +## 1. First-time setup (AP configuration) |
22 | 22 |
|
23 | | -1. In `main.c` at line 36, locate the following code: |
| 23 | +1. When the development board starts, it will enter **AP mode**. |
| 24 | + Connect your phone or computer to the device hotspot (password shown on the screen): |
| 25 | +  |
24 | 26 |
|
25 | | -```c |
26 | | -while (rt_wlan_connect("TEST", "88888888")); |
27 | | -``` |
| 27 | +2. After a successful connection, open a browser and enter **192.168.169.1** to access the configuration interface: |
| 28 | + |
| 29 | +3. Click **Scan** to search for nearby Wi-Fi hotspots: |
| 30 | +  |
| 31 | + |
| 32 | +4. After the WiFi connection is successful, the following page will be displayed: |
| 33 | +  |
| 34 | + |
| 35 | +5. When the device screen shows **“Standby”**, it means voice interaction is ready: |
| 36 | +  |
| 37 | + |
| 38 | +> **Tip:** Press the **first user button** on the development board to enter voice input. After waiting 1–2 seconds, XiaoZhi will automatically respond. |
| 39 | +
|
| 40 | +# XiaoZhi Expression Meaning |
| 41 | + |
| 42 | +## 1. Connecting (please wait) |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +## 2. Monitoring (press the button to start talking) |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +## 3. Listening (processing your speech) |
28 | 51 |
|
29 | | -2. Replace "TEST" with your WiFi name and "88888888" with the password, then recompile and flash. |
30 | | -3. For detailed WiFi usage, refer to: [**WIFI**](../../Edgi-Talk_WIFI/Edgi_Talk_M55_WIFI/README.md) |
| 52 | + |
31 | 53 |
|
32 | | -### Build and Download |
| 54 | +## 4. Speaking (XiaoZhi is responding to you) |
33 | 55 |
|
34 | | -1. Open and compile the project. |
35 | | -2. Connect the board USB to PC via **DAP**. |
36 | | -3. Flash the compiled firmware to the device. |
| 56 | + |
37 | 57 |
|
38 | | -### Running Result |
| 58 | +## 5. Sleep mode (low power) |
39 | 59 |
|
40 | | -* After power-on, the device runs the example automatically. |
| 60 | + |
41 | 61 |
|
42 | | -* The screen displays the current status: |
| 62 | +> To exit sleep: press the button → wait for “Standby” → interaction becomes available. |
43 | 63 |
|
44 | | - * **Connecting** – connecting to Wi-Fi |
45 | | - * **On standby** – idle mode |
46 | | - * **Listening** – ready for voice interaction |
47 | | - * **Sleeping** – low-power sleep mode |
| 64 | +### Running Effect |
48 | 65 |
|
49 | | -* Hold down the top button to speak and enter the Listening state for voice interaction. |
| 66 | +* After flashing, the device will start the sample automatically on power-up. |
| 67 | +* Press the top button once to enter the **Listening** state and interact with the device. |
| 68 | +  |
50 | 69 |
|
51 | 70 | ## Notes |
52 | 71 |
|
53 | | -* First-time setup requires backend binding via [XiaoZhi Official Website](https://xiaozhi.me/). |
| 72 | +* For first-time use, visit the [XiaoZhi official website](https://xiaozhi.me/) to complete backend binding. |
54 | 73 |  |
55 | | -  |
| 74 | + Press the user button to display the verification code on the screen. |
56 | 75 |
|
57 | | -* Ensure Wi-Fi SSID and password are correct and use **2.4 GHz** frequency. |
| 76 | +* Please ensure the WiFi SSID and password are correct and that you are using a **2.4GHz network**. |
58 | 77 |
|
59 | | -* Device must have internet access. |
| 78 | +* The device requires an Internet connection to function properly. |
60 | 79 |
|
61 | | -* To modify graphical configurations, use: |
| 80 | +* If you need to modify the **graphical configuration**, use the following tools: |
62 | 81 |
|
63 | 82 | ``` |
64 | 83 | tools/device-configurator/device-configurator.exe |
|
0 commit comments