Quick Start

Last Updated on : 2025-03-19 07:38:49download

This topic walks you through the concepts and development process of the Wukong AI Hardware Development Framework.

Preparation: Set up environment

  • Hardware environment:

    • T5 development board: See how to get a T5 development board.
    • Type-C cable
    • Speaker: Require a JST GH 1.25 mm interface with a 2-pin connector.
    • Personal computer (PC)
  • Software environment: Install USB-to-serial chip driver and Tuya Wind IDE on your PC (installation environment: Linux virtual machine or Windows host with Linux virtual machine).

  • TuyaOS development: Check TuyaOS Quick Start to know the overall development process.

Step 1: Create product

To create AI hardware products, you must create and bind your AI agents based on the original product creation process. Currently, the Tuya Developer Platform has fully launched development capabilities for AI hardware products. For more information, see AI Capabilities Development.

Step 2: Get development framework

You can get the Wukong AI Hardware Development Framework on the Tuya Wind IDE. Perform the following steps:

Request permissions

  1. Start the Tuya Wind IDE and go to the Resource Center.

  2. Select the options as shown in the figure below, click Request Permission, fill in Tuya’s business email address, and initiate a request for development framework permissions.

    Quick Start

Create framework

After approval, go to the Home, click Create Framework, select the options as shown in the figure below, and then click Finish.

Quick Start

Modify PID and authorization information

After completing the creation of the development framework, the Tuya Wind IDE will automatically download the Demo. However, the PID and authorization information included in the demo code are generally not usable (as they are occupied by other developers), so you need to modify them yourself. Please refer to the Modify PID and authorization information to fill in the PID and authorization information for the product you just created.

Build demo

  1. After the framework is downloaded, the framework directory will appear on the left-side explorer of Visual Studio Code. Choose software > TuyaOS > apps to find the demo tuya_demo_ai_toy.

  2. Right-click on the folder and choose Build Project. Enter the version number and press the Enter key to start building the project.

    Quick Start

The first compilation will pull the development environment, extract the toolchain, and set up a virtual build environment, so it will take some time. Please be patient.

  • Compilation successful: If the compilation is successful, the following figure will be displayed and the corresponding firmware will be generated.

    Quick Start

    Quick Start

  • Compilation failed: If the compilation fails, it might be due to a failure in setting up the virtual environment. Follow these steps to troubleshoot the error:

    1. First, install the armino environment and check whether the environment is configured successfully: echo $ARMINO_PATH.

      mkdir -p ~/armino
      
      cd ~/armino
      
      git clone https://github.com/bekencorp/armino.git
      
      export ARMINO_PATH=~/armino/armino (You can also write this line to /etc/profile and restart the computer)
      
    2. Run the following commands in the terminal to install Python, CMake, Ninja, and dependencies.

      sudo dpkg --add-architecture i386
      
      sudo apt-get update
      
      sudo apt-get install build-essential cmake python3 python3-pip doxygen ninja-build libc6:i386 libstdc++6:i386 libncurses5-dev lib32z1 -y
      
    3. A compilation error occurred. (You can search and install the missing content yourself.)

      Error Solution
      ModuleNotFoundError: No module named ‘click’ pip install click
      ModuleNotFoundError: No module named ‘Crypto’ pip install pycryptodome
      ModuleNotFoundError: No module named ‘ruamel’ pip3 install ruamel.yaml

    If the problem persists after using the above methods, you can post your questions in the Tuya Developer Forum. ​

Step 3: Flash firmware

Connect to device

Connect a device to the PC using a Type-C cable and map the port to the Linux system.

Taking VMware and Linux as an example, click VM > Removable Devices > QinHeng USB Dual_Serial > Connect.

Flash firmware

  1. Go back to Tuya Wind IDE, find the target QIO firmware just generated (path: software > TuyaOS > apps > tuyaos_demo_ai_toy > output/xx.xx.xx > tuyaos_demo_ai_toy_QIO_xx.xx.xx.bin), right-click and select Flash App.

    Quick Start
  2. Select the serial port number, usually ttyACM0.

    Quick Start

  3. If the terminal remains stuck at Waiting Reset…, it indicates that this hardware does not support the auto-reset feature. You must press the reset (RST) button to restart the device.

    Quick Start

  4. On receiving the device restart signal, the Tuya Wind IDE begins flashing the firmware. When the terminal shows information like this, it indicates that the flashing process is completed.

    Quick Start

Feature demonstration

Restart the development board and use the Tuya Smart app to perform device pairing. For more information, see Feature Demonstration.