MCU Low-Code Development - Tuya Smart - Documentation
MCU Low-Code Development - Tuya Smart - Documentation
MCU Low-Code Development - Tuya Smart - Documentation
Version: 20210608
Online Version
Contents
Contents
1 Overview 2
2 Solution selection 3
3 Product creation 5
3.1 1. Create a product . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 2. Function definition . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 3. Select a panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 4. Download development documents . . . . . . . . . . . . . . . 7
4 Development debugging 9
4.1 Hardware debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Software debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Joint debugging of functions . . . . . . . . . . . . . . . . . . . . . . . 10
i
Contents
1 / 10
1 OVERVIEW
1 Overview
As one of the most frequently-used solutions to connect to the Tuya IoT Console, the
MCU connection solution is mainly used to enable products with MCU to be smart.
Tuya provides hardware modules, apps, and cloud services. You only need to fo-
cus on product function research and development and develop the smart products
efficiently and quickly with Tuya MCU SDK, public version app, and panel.
2 / 10
2 SOLUTION SELECTION
2 Solution selection
• App solution
An app solution often uses a public version app or OEM app. You can download
and use the free public version apps from application stores, including the Tuya
Smart app and Smart Life app (with a neutral logo). If you want an app of your
own brand, Tuya also provides an OEM app service. You can create an OEM app
online. For more information, see OEM App Auto Building.
Tuya provides global customers with a safe, stable, and fast Tuya cloud ser-
vice. By connecting to Tuya Cloud through Tuya modules, you can be free from
research and development. To connect to the cloud, you can use Tuya Cloud
OpenAPI to develop a native app quickly. For more information about the cloud
development platform, see Solutions Introduction.
• Hardware solution
When you select a hardware solution, the main focus is the communication
type and the module. A module in which the general firmware is burned is
called a general module. At present, Tuya general modules support numerous
3 / 10
2 SOLUTION SELECTION
communication types, including Wi-Fi, BLE, Zigbee, NB-IoT, and GPRS. Before
connection, select the communication type of the module according to actual
requirements. Specific module types are recommended in the IoT Console after
you create a product.
4 / 10
3 PRODUCT CREATION
3 Product creation
After you select a solution, you need to create a product in Tuya IoT Console and
download MCU development documents. Tuya IoT Console is an online one-stop
development platform, covering all the steps from product creation to mass produc-
tion. There are four main steps.
• When you create a product, you can choose from the plug-and-play solution
and custom solution.
• For MCU connection, the products use custom solutions. The communication
type determines the protocol and module recommendation.
5 / 10
3 PRODUCT CREATION
For more information about function selection, see Standard Functions. A data point
(DP) is an abstract representation of product functions.
• Tuya provides all products with standard DPs. You can select DPs according to
your actual requirements.
• If standard DPs fail to meet your requirements, you can customize them. For
more information about custom functions, see Custom Functions.
• Tuya provides nearly 100 types of free public version panels for you. The pub-
lic version panels can be customized. For more information about app panel
6 / 10
3 PRODUCT CREATION
• If you want to customize the panel, Tuya provides a custom panel development
service.
IoT Console recommends modules to you according to your product and communica-
tion solution. You can place an order online, or select another module according to
actual requirements. For the module datasheet, see TYWE1S Module Datasheet.
7 / 10
3 PRODUCT CREATION
• Tuya serial port debugging assistant: It integrates serial port debugging tools
for communication protocols of Tuya modules. It is used in the development
debugging of MCU general connection solutions.
8 / 10
4 DEVELOPMENT DEBUGGING
4 Development debugging
After the product is created, you can purchase module samples, download the soft-
ware development kit (SDK) in the IoT Console, and enter development debugging.
Click to view tutorials according to the protocols in the downloaded SDK.
• Wi-Fi:
After you receive the module sample, you can build a minimum system. With a Tuya
host, you can configure the network, operate, and get to know the data interaction
process of the protocol. For more information, see the following topics:
Different SDKs have different requirements for MCU hardware resources. For exam-
ple, according to Wi-Fi MCU SDK, the Flash sector size must be 4 KB. RAM size is
related to DP data length, and RAM is about 100 bytes.
9 / 10
4 DEVELOPMENT DEBUGGING
If the OTA function is configured, RAM must be greater than 260 bytes. The func-
tion nesting level is 9 levels. In case of insufficient resources, you can implement
connection protocols by yourself, and refer to functions in the SDK.
For more information about the software debugging, see Overview of migrating
Tuya’s MCU SDK.
During joint debugging of functions, enter IoT Console > Operation to view back-
ground data and make decisions. For more information, see Operations Guide of
Operation Center.
Tuya provides an online support service. If documentation fails to solve your ques-
tion, raise your question online. Our professional technical team will be ready to
help you.
For more information about the support center, see Tutorial for Tuya Support Cen-
ter.
10 / 10