Skip to content

Commit f95b83a

Browse files
YangJieflyingcys
YangJie
authored andcommitted
docs: add quick start guide for Tuya IoT platform in English and Chinese
1 parent a89847e commit f95b83a

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ It is recommended to install and use the latest version of Arduino IDE 2, which
5959

6060
+ In the "Board Manager", search for "Tuya Open" and install the latest version.
6161

62+
## How to use arduino-tuyaopen for cloud connection
63+
64+
+ [Connect to Tuya IoT Platform](./libraries/TuyaIoT/examples/quickStart/README.md)
65+
6266
## Hardware Introduction for Development Board
6367

6468
+ [T2-U Development Board](https://developer.tuya.com/cn/docs/iot/t2-u-board?id=Kce6cq9e9vlmv)

Diff for: README_zh.md

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ arduino-tuyaopen 基于 [tuya-open-sdk-for-device](https://github.com/tuya/tuya-
6060

6161
+ 在 “开发板管理器”,输入 "Tuya Open" 查找并安装最新版本。
6262

63+
## 如何使用 arduino-tuyaopen 进行云连接
64+
65+
+ [连接 Tuya IoT 平台](./libraries/TuyaIoT/examples/quickStart/README_zh.md)
66+
6367
## 开发板硬件简介
6468

6569
+ [T2-U 开发板](https://developer.tuya.com/cn/docs/iot/t2-u-board?id=Kce6cq9e9vlmv)

Diff for: libraries/TuyaIoT/examples/quickStart/README.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Tuya IoT Quick Start
2+
3+
Tuya Cloud Application is an application provided by the Tuya IoT platform. With Tuya Cloud Application, developers can quickly implement remote device control, device management, and other functions.
4+
5+
The `quickStart` demonstrates a simple, cross-platform, cross-system switch example that supports multiple connections. Through the Tuya APP and Tuya Cloud Service, you can remotely control this LED.
6+
7+
## Product Creation
8+
9+
Refer to the [Product Creation Documentation](https://developer.tuya.com/en/docs/iot-device-dev/application-creation?id=Kbxw7ket3aujc) to create a product on the [Tuya IoT](https://iot.tuya.com) platform and obtain the PID of the created product.
10+
11+
Then replace the PID in `quickStart` with the PID you obtained.
12+
13+
```c
14+
void setup() {
15+
...
16+
TuyaIoT.begin("YOUR PID", PROJECT_VERSION);
17+
}
18+
```
19+
20+
## Confirm TuyaOpen License Code
21+
22+
Products developed through this project need to use the TuyaOpen-specific license code. Using other license codes will not connect to the Tuya Cloud properly.
23+
24+
Modify the license code in the code as follows:
25+
26+
```c
27+
// Tuya license
28+
#define TUYA_DEVICE_UUID "uuidxxxxxxxxxxxxxxxx"
29+
#define TUYA_DEVICE_AUTHKEY "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
30+
```
31+
32+
If you do not have a TuyaOpen license code, you can obtain it through the following methods:
33+
34+
+ Purchase a module with the TuyaOpen license code pre-burned. This license code is burned into the corresponding module at the factory and will not be lost. TuyaOpen reads the license code through the `TuyaIoT.readBoardLicense(&license);` interface at startup. Please confirm whether the current device has the TuyaOpen license code burned.
35+
36+
+ If the current module does not have the TuyaOpen license code burned, you can purchase the TuyaOpen license code through the [TuyaIoT platform](https://platform.tuya.com/purchase/index?type=6).
37+
38+
+ Obtain a free TuyaOpen license code through the following activities:
39+
40+
To allow developers to freely experience the TuyaOpen Framework, you can now get a free TuyaOpen Framework-specific license code by starring the TuyaOpen Framework repository on GitHub, including:
41+
42+
+ [tuyaopen](https://github.com/tuya/tuyaopen)
43+
+ [arduino-tuyaopen](https://github.com/tuya/arduino-tuyaopen)
44+
+ [luanode-tuyaopen](https://github.com/tuya/luanode-tuyaopen)
45+
46+
With your GitHub account and screenshot, send an email to `[email protected]` or join the QQ group `796221529` and contact the group owner to receive a free TuyaOpen Framework-specific license code. Limited to 500 codes, first come first served, while supplies last. Scan the QR code below to join the group and claim your code👇:
47+
48+
![qq_qrcode](https://github.com/tuya/tuyaopen/blob/master/docs/images/zh/qq_qrcode.png?raw=true)

Diff for: libraries/TuyaIoT/examples/quickStart/README_zh.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Tuya IoT 快速上手
2+
3+
涂鸦云应用是涂鸦 IoT 平台提供的一种应用,通过涂鸦云应用,开发者可以快速实现设备远程控制、设备管理等功能。
4+
5+
`quickStart` 演示一个简单的,跨平台、跨系统、支持多种连接的开关示例,通过涂鸦 APP、涂鸦云服务,可以对这个 LED 进行远程控制。
6+
7+
## 产品创建
8+
9+
参考[产品创建文档](https://developer.tuya.com/cn/docs/iot-device-dev/application-creation?id=Kbxw7ket3aujc),在 [Tuya IoT](https://iot.tuya.com) 平台上创建产品,并获取到创建产品的 PID 。
10+
11+
然后在 `quickStart` 中 PID 替换为您创建得到的 PID。
12+
13+
```c
14+
void setup() {
15+
...
16+
TuyaIoT.begin("YOUR PID", PROJECT_VERSION);
17+
}
18+
```
19+
20+
## 确认 tuyaopen 授权码
21+
22+
通过该项目开发的产品需采用 TuyaOpen 专用授权码,使用其他授权码无法正常连接涂鸦云。
23+
24+
在代码中修改授权码的位置如下:
25+
26+
```c
27+
// Tuya license
28+
#define TUYA_DEVICE_UUID "uuidxxxxxxxxxxxxxxxx"
29+
#define TUYA_DEVICE_AUTHKEY "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
30+
```
31+
32+
如果没有 tuyaopen 的授权码,可以通过下面的方式进行获取:
33+
34+
+ 购买已烧录 TuyaOpen 授权码模块。该授权码已经在出厂时烧录在对应模组中,且不会丢失。tuyaopen 在启动时通过 `TuyaIoT.readBoardLicense(&license);` 接口读取授权码。请确认当前设备是否为烧录了 tuyaopen 授权码。
35+
36+
+ 如当前模组未烧录 TuyaOpen 授权码,可通过 [TuyaIoT 平台](https://platform.tuya.com/purchase/index?type=6)购买 tuyaopen 授权码。
37+
38+
+ 通过下面的活动获取免费 TuyaOpen 授权码
39+
40+
为了让开发者们可以自由体验 Tuyaopen Framework,现在只要在 GitHub 上给 Tuyaopen Framework 开发框架仓库加 star,包括:
41+
42+
+ [tuyaopen](https://github.com/tuya/tuyaopen)
43+
+ [arduino-tuyaopen](https://github.com/tuya/arduino-tuyaopen)
44+
+ [luanode-tuyaopen](https://github.com/tuya/luanode-tuyaopen)
45+
46+
凭 github 账号和截图,发送邮件至 `[email protected]` 或 加入 QQ 群 `796221529` 向群主免费领取一个 TuyaOpen Framework 专用授权码。限量 500 个,先到先得,送完即止,赶紧扫码加群来领👇:
47+
48+
![qq_qrcode](https://github.com/tuya/tuyaopen/blob/master/docs/images/zh/qq_qrcode.png?raw=true)

0 commit comments

Comments
 (0)