diff --git a/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/README.md b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/README.md new file mode 100644 index 0000000000..f1f494465b --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/README.md @@ -0,0 +1,213 @@ +# 自动感应门 +# 简介 +很多公共场所采用自动感应门,当有人靠近时门会自动打开,远离时自动关门;有时候需要将门常开比如搬运货物,不方便将门关闭;或者场所夜晚关门时需要常关,不允许他人进入。 + +本案例模拟相应场景,设计一款可以使用手机APP来控制自动感应门的系统。 +## 红外避障传感器 + + - 红外避障是避障传感器的一种,具有一对红外线发射与接收管,发射管发射出一定频率的红外线,当检测方向遇到障碍物(信号输出接口输出低电平信号,可通过电位器旋钮调节检测距离)。 + - 规格参数: + + 1.工作电压:DC 3.3V-5V + + 2.工作电流:≥20mA + + 3.工作温度:-10℃—+50℃ + + 4.检测距离:2-30cm + + 5.输出信号:有障碍物或反射到地面输出低电平,无障碍物高电平 + + 6.调节方式:多圈电阻式调节 + + 7.有效角度:35° +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +红外避障传感器|1 +SG90舵机|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台 + +2、启用两个线程,避障传感器每秒将检测状态上传阿里云;舵机根据条件判断是否开门。 + +3、创建‘移动应用’功能,控制门禁正常、常闭、常开模式,并实时检测累计人流量。 + +4、将门禁状态上传阿里云平台。 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/auto_control_door.zip),以下为手动添加的操作流程。 + +选择产品**功能定义**--**编辑草稿** +
+ +
+ +1、**添加自定义功能** +2、按照图2显示添加**标识符**与**数据类型**(标识符要与代码一致) +3、点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[自动感应门代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ + +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +## 3、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印红外避障传感器的状态**,当有人进入打印‘open the door’,控制舵机开门,并显示上传云端当前人数;当没人进入打印‘no object detected’。 +
+ +
+ +2、阿里云平台,打开**实时刷新**,会显示当前 进入人数。 +
+ +
+ +## 4、创建移动应用 +### 创建‘普通项目’ +
+ +
+
+ +
+ +创建完自动跳转主页,关联相应产品 +
+ +
+
+ +
+ +返回主页,新建移动应用 +
+ +
+
+ +
+ +自动跳转应用编辑界面,选择组件→基础组件→图表→实时曲线,或者直接搜索。 +添加完成后,配置组件信息。 +
+ +
+
+ +
+
+ +
+
+ +
+ +添加‘单选’组件,并配置组件信息。 +
+ +
+
+ +
+ +配置交互信息。 +
+ +
+
+ +
+ +配置完成后保存,点击预览可以查看设置好的移动应用。 +
+ +
+ +手机扫描二维码,可以在手机上选择自动门模式,并且实时查看人流量。 +
+ +
diff --git a/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/code/board.json new file mode 100644 index 0000000000..0fcefceca5 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/code/board.json @@ -0,0 +1,55 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "pwm_lpg": { + "type": "PWM", + "port": 3 + }, + "infrared":{ + "type":"GPIO", + "port": 20, + "dir": "input", + "pull":"pullup" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/code/main.py new file mode 100644 index 0000000000..c5e7d59043 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/code/main.py @@ -0,0 +1,252 @@ +# coding=utf-8 + +from driver import GPIO +from driver import PWM +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +import _thread + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + +servo_data={} +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global servo_data,door_status + params=request['params'] + params=eval(params) + door_status=params["door_status"] + servo_data["door_status"]= door_status + servo_data_str=ujson.dumps(servo_data) + data={ + 'params':servo_data_str + } + device.postProps(data) + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +count_data = {} +def upload_count(): + global count_data + count_data["person_count"]= count + count_data_str=ujson.dumps(count_data) + data1={ + 'params':count_data_str + } + device.postProps(data1) + + +def setOptionSero(duty_cycle): + global servo + param2 = {'freq':50, 'duty': duty_cycle } + servo.setOption(param2) + + +def operatorDoor(): + global detected, closed,door_status + closed = True + # 开门后判断是否还有人 + while True: + time.sleep_ms(50) + if door_status == 1: + openDoor() + elif door_status == -1: + closeDoor() + else: + if detected == True: + openDoor() + else: + closeDoor() + + +def openDoor(): + global closed,servo + if closed == True: + print("open the door") + setOptionSero(12) + # TODO 开门操作 + closed = False + +def closeDoor(): + global closed,servo + if closed == False: + time.sleep_ms(200) + print("close the door") + # 操作关门 + setOptionSero(5) + closed = True + +def infrared_status(): + global detected, count, door_status + while True: # 无限循环 + time.sleep_ms(50) + status = infrared.read() + # 检测到物体 + if status == 0: + detected = True + # 非常闭状态的才上报 + if door_status != -1: + count = count + 1 + print("object detected, count = " + str(count)) + upload_count() + # 检测到人后停5秒再检测,相当于模拟行人通过的时间 + time.sleep(5) + # 没有检测到 + elif status == 1: + detected = False + print('no object detected') + # 没检测到人,则间隔500ms检测一次 + time.sleep_ms(500) + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + # 初始化红外 + infrared = GPIO() + print(infrared,'---------------------------') + infrared.open("infrared") + # 初始化舵机 + servo = PWM() + servo.open("pwm_lpg") + #初始化数据 + count = 0 + detected = False + door_status = 0 + upload_count() + time.sleep(2) + try: + # 启动红外检测 + _thread.start_new_thread(infrared_status, ()) + # 启动舵机模拟开门/关门操作线程 + _thread.start_new_thread(operatorDoor, ()) + except Exception as e: + print(e) + print("Error: unable to start thread") + + while True: + time.sleep_ms(1000) + diff --git a/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/link_platform/auto_control_door.zip b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/link_platform/auto_control_door.zip new file mode 100644 index 0000000000..fc326b4c6a Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/auto_control_door/haas506/link_platform/auto_control_door.zip differ diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/README.md b/haas_lib_bundles/python/docs/examples/counter/haas506/README.md new file mode 100644 index 0000000000..f9ca5c57c3 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/counter/haas506/README.md @@ -0,0 +1,156 @@ +# 番茄钟 +# 简介 +番茄工作法是一种可以有效管理时间的工具,在平时的工作学习中经常会被各种所谓的“事情”(抽根烟、吃点零食、说悄悄话等等)给打断,极大降低工作学习的效率。有了番茄工作法,我们可以在规定的番茄时间内专注于做一件事情,中途不能再做与该事情无关的事,直到番茄时间结束,然后就在系统中给这件事记录一个番茄。番茄工作法可以非常有效地提高工作学习效率. + +本案例制作一个25分钟的番茄时钟,时钟有两种模式: + +- 无限计时模式,倒计时到时间后,番茄数加一,记录总的番茄数,没到时间按按键时间会重启 + +- 手动计时模式,每次倒计时结束时钟停止,手动按按键后重新计时,没到时间按按键时间会重启 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +OLED显示屏|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台,上传番茄数和模式默认0 + +2、按下按键,番茄钟开始倒计时.显示番茄数,模式,当前时间 + +3、倒计时结束上报当前番茄数 + +4、通过云端调节番茄钟模式 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/model.zip). + +选择产品**功能定义**--**编辑草稿** +
+ +
+ +1、**导入物模型** +
+ +
+ + - 发布上线 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[番茄时钟代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ + +修改位置 + +aliyun.py + +```python +# coding=utf-8 +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import ota +import kv + + + + +#更改产品信息 +############################### +productKey = "productKey" +productSecret = "productSecret" +############################### + +``` + +## 3、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印红外避障传感器的状态**,当有人进入打印‘open the door’,控制舵机开门,并显示上传云端当前人数;当没人进入打印‘no object detected’。 +
+ +
+ +2、阿里云平台,打开**实时刷新**,会显示当前番茄数量和当前模式。 +
+ +
+ +3、OLED显示屏显示番茄数,模式,当前倒计时时间 +
+ +
+ +4、在线调试设置番茄钟模式 +
+ +
+ +5、OLED显示屏模式改变 +
+ +
+ \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/code/aliyun.py b/haas_lib_bundles/python/docs/examples/counter/haas506/code/aliyun.py new file mode 100644 index 0000000000..8919fe3861 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/counter/haas506/code/aliyun.py @@ -0,0 +1,258 @@ +# coding=utf-8 +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import ota +import kv + + + + +#更改产品信息 +############################### +productKey = "productKey" +productSecret = "productSecret" +############################### +global deviceName,g_connect_status,device_dyn_resigter_succed,netw +g_connect_status = False +netw = None +device = None +deviceSecret = None +device_dyn_resigter_succed = False + +#初始化物联网平台Device类,获取device实例 +device = Device() +# 定义需要升级的模块和版本号 +module_name = 'default' +app_version = '1.0.1' +# 定义升级包的下载和安装路径,其中url,hash_type和hash 会通过服务端推送被保存下来 +info = { + 'url': '', + 'store_path': '/data/pyamp/app.zip', + 'install_path': '/data/pyamp/', + 'length': 0, + 'hash_type': '', + 'hash': '' +} + + # ota 消息推送的接受函数 +def on_trigger(data): + global info + # 保存服务端推送的ota信息 + info['url'] = data['url'] + info['length'] = data['length'] + info['module_name'] = data['module_name'] + info['version'] = data['version'] + info['hash'] = data['hash'] + info['hash_type'] = data['hash_type'] + # 开始ota 包下载 + dl_data = {} + dl_data['url'] = info['url'] + dl_data['store_path'] = info['store_path'] + ota.download(dl_data) + + + + # ota 升级包下载结果回调函数 +def on_download(data): + global info + if data >= 0: + print('Ota download succeed') + # 开始ota包校验 + param = {} + param['length'] = info['length'] + param['store_path'] = info['store_path'] + param['hash_type'] = info['hash_type'] + param['hash'] = info['hash'] + ota.verify(param) + + # ota 升级包校验结果回调函数 +def on_verify(data): + global info + print(data) + if data >= 0 : + print('Ota verify succeed') + print('Start Upgrade') + # 开始ota升级 + param = {} + param['length'] = info['length'] + param['store_path'] = info['store_path'] + param['install_path'] = info['install_path'] + ota.upgrade(param) + + # ota 升级包结果回调函数 +def on_upgrade(data): + if data >= 0 : + print('Ota succeed') + #ota升完级后 重启设备 + reboot() + + +connect_state = False +def get_connect_state(): + global connect_state + return connect_state +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade,connect_state + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + # 初始化ota服务 + ota.init(data_handle) + connect_state = True + # ota 回调函数注册 + ota.on(1,on_trigger) + ota.on(2,on_download) + ota.on(3,on_verify) + ota.on(4,on_upgrade) + report_info = { + "device_handle": data_handle['device_handle'], + "product_key": productKey , + "device_name": deviceName , + "module_name": module_name , + "version": app_version + } + # 上报本机ota相关信息,上报版本信息返回以后程序返回,知道后台推送ota升级包,才会调用on_trigger函数 + ota.report(report_info) + +def get_model(): + global model + return model +model = 0 +model_data = {} +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global model + print('clound req data is {}'.format(request)) + # # # #获取消息中的params数据 + params=request['params'] + # #去除字符串的'',得到字典数据 + params=eval(params) + + if "model" in params : + model = params["model"] + print('model',model) + model_data['model'] = model + up_data(model_data) + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + + else: + g_connect_status = False + + +#网络连接 +def connect_network(): + global netw,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + netw = network.NetWorkClient() + g_register_network = False + if netw._stagecode is not None and netw._stagecode == 3 and netw._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + netw.on(1,on_4g_cb) + netw.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + +# 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + +def connect(): + global deviceName,g_connect_status,device_dyn_resigter_succed + deviceName = None + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + # 连接网络 + connect_network() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + + +def up_data(d): + d_str = ujson.dumps(d) + data={ + 'params':d_str + } + device.postProps(data) + + + + diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/counter/haas506/code/board.json new file mode 100644 index 0000000000..3dcd6cee1d --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/counter/haas506/code/board.json @@ -0,0 +1,54 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "OLED": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 60 + }, + "KEY1": { + "type": "GPIO", + "port": 44, + "dir": "irq", + "pull": "pullup", + "intMode": "falling" + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/code/codetab.py b/haas_lib_bundles/python/docs/examples/counter/haas506/code/codetab.py new file mode 100644 index 0000000000..ec91dab05e --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/counter/haas506/code/codetab.py @@ -0,0 +1,330 @@ + +# 每个字符是8x16(宽x高) 点阵, +F2=[ + 0x10,0xF0,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, #*"h",0*# + + 0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x19,0x24,0x24,0x12,0x3F,0x20,0x00, #*"a",1*# + + 0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x19,0x24,0x24,0x12,0x3F,0x20,0x00, #*"a",2*# + + 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00, #*"s",3*# + + 0x00,0xF8,0x88,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x20,0x20,0x20,0x11,0x0E,0x00, #*"5",4*# + + 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00, #*"0",5*# + + 0x00,0xE0,0x10,0x88,0x88,0x90,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x20,0x1F,0x00, #*"6",6*# + +] + +#字符串 6x8点阵 +F6x8=[ + [0x00, 0x00, 0x00, 0x00, 0x00, 0x00],# sp + [0x00, 0x00, 0x00, 0x2f, 0x00, 0x00],# ! + [0x00, 0x00, 0x07, 0x00, 0x07, 0x00],# " + [0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14],# # + [0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12],# $ + [0x00, 0x62, 0x64, 0x08, 0x13, 0x23],# % + [0x00, 0x36, 0x49, 0x55, 0x22, 0x50],# & + [0x00, 0x00, 0x05, 0x03, 0x00, 0x00],# ' + [0x00, 0x00, 0x1c, 0x22, 0x41, 0x00],# ( + [0x00, 0x00, 0x41, 0x22, 0x1c, 0x00],# ) + [0x00, 0x14, 0x08, 0x3E, 0x08, 0x14],# * + [0x00, 0x08, 0x08, 0x3E, 0x08, 0x08],# + + [0x00, 0x00, 0x00, 0xA0, 0x60, 0x00],# , + [0x00, 0x08, 0x08, 0x08, 0x08, 0x08],# - + [0x00, 0x00, 0x60, 0x60, 0x00, 0x00],# . + [0x00, 0x20, 0x10, 0x08, 0x04, 0x02],# # + [0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E],# 0 + [0x00, 0x00, 0x42, 0x7F, 0x40, 0x00],# 1 + [0x00, 0x42, 0x61, 0x51, 0x49, 0x46],# 2 + [0x00, 0x21, 0x41, 0x45, 0x4B, 0x31],# 3 + [0x00, 0x18, 0x14, 0x12, 0x7F, 0x10],# 4 + [0x00, 0x27, 0x45, 0x45, 0x45, 0x39],# 5 + [0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30],# 6 + [0x00, 0x01, 0x71, 0x09, 0x05, 0x03],# 7 + [0x00, 0x36, 0x49, 0x49, 0x49, 0x36],# 8 + [0x00, 0x06, 0x49, 0x49, 0x29, 0x1E],# 9 + [0x00, 0x00, 0x36, 0x36, 0x00, 0x00],# : + [0x00, 0x00, 0x56, 0x36, 0x00, 0x00],# ; + [0x00, 0x08, 0x14, 0x22, 0x41, 0x00],# < + [0x00, 0x14, 0x14, 0x14, 0x14, 0x14],# = + [0x00, 0x00, 0x41, 0x22, 0x14, 0x08],# > + [0x00, 0x02, 0x01, 0x51, 0x09, 0x06],# ? + [0x00, 0x32, 0x49, 0x59, 0x51, 0x3E],# @ + [0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C],# A + [0x00, 0x7F, 0x49, 0x49, 0x49, 0x36],# B + [0x00, 0x3E, 0x41, 0x41, 0x41, 0x22],# C + [0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C],# D + [0x00, 0x7F, 0x49, 0x49, 0x49, 0x41],# E + [0x00, 0x7F, 0x09, 0x09, 0x09, 0x01],# F + [0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A],# G + [0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F],# H + [0x00, 0x00, 0x41, 0x7F, 0x41, 0x00],# I + [0x00, 0x20, 0x40, 0x41, 0x3F, 0x01],# J + [0x00, 0x7F, 0x08, 0x14, 0x22, 0x41],# K + [0x00, 0x7F, 0x40, 0x40, 0x40, 0x40],# L + [0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F],# M + [0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F],# N + [0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E],# O + [0x00, 0x7F, 0x09, 0x09, 0x09, 0x06],# P + [0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E],# Q + [0x00, 0x7F, 0x09, 0x19, 0x29, 0x46],# R + [0x00, 0x46, 0x49, 0x49, 0x49, 0x31],# S + [0x00, 0x01, 0x01, 0x7F, 0x01, 0x01],# T + [0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F],# U + [0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F],# V + [0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F],# W + [0x00, 0x63, 0x14, 0x08, 0x14, 0x63],# X + [0x00, 0x07, 0x08, 0x70, 0x08, 0x07],# Y + [0x00, 0x61, 0x51, 0x49, 0x45, 0x43],# Z + [0x00, 0x00, 0x7F, 0x41, 0x41, 0x00],# [ + [0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55],# 55 + [0x00, 0x00, 0x41, 0x41, 0x7F, 0x00],# ] + [0x00, 0x04, 0x02, 0x01, 0x02, 0x04],# ^ + [0x00, 0x40, 0x40, 0x40, 0x40, 0x40],# _ + [0x00, 0x00, 0x01, 0x02, 0x04, 0x00],# ' + [0x00, 0x20, 0x54, 0x54, 0x54, 0x78],# a + [0x00, 0x7F, 0x48, 0x44, 0x44, 0x38],# b + [0x00, 0x38, 0x44, 0x44, 0x44, 0x20],# c + [0x00, 0x38, 0x44, 0x44, 0x48, 0x7F],# d + [0x00, 0x38, 0x54, 0x54, 0x54, 0x18],# e + [0x00, 0x08, 0x7E, 0x09, 0x01, 0x02],# f + [0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C],# g + [0x00, 0x7F, 0x08, 0x04, 0x04, 0x78],# h + [0x00, 0x00, 0x44, 0x7D, 0x40, 0x00],# i + [0x00, 0x40, 0x80, 0x84, 0x7D, 0x00],# j + [0x00, 0x7F, 0x10, 0x28, 0x44, 0x00],# k + [0x00, 0x00, 0x41, 0x7F, 0x40, 0x00],# l + [0x00, 0x7C, 0x04, 0x18, 0x04, 0x78],# m + [0x00, 0x7C, 0x08, 0x04, 0x04, 0x78],# n + [0x00, 0x38, 0x44, 0x44, 0x44, 0x38],# o + [0x00, 0xFC, 0x24, 0x24, 0x24, 0x18],# p + [0x00, 0x18, 0x24, 0x24, 0x18, 0xFC],# q + [0x00, 0x7C, 0x08, 0x04, 0x04, 0x08],# r + [0x00, 0x48, 0x54, 0x54, 0x54, 0x20],# s + [0x00, 0x04, 0x3F, 0x44, 0x40, 0x20],# t + [0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C],# u + [0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C],# v + [0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C],# w + [0x00, 0x44, 0x28, 0x10, 0x28, 0x44],# x + [0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C],# y + [0x00, 0x44, 0x64, 0x54, 0x4C, 0x44],# z + [0x14, 0x14, 0x14, 0x14, 0x14, 0x14]# horiz lines +] + + +#字符串 8x16点阵 +F8X16=[ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,# 0 + 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,#! 1 + 0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#" 2 + 0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,## 3 + 0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,#$ 4 + 0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,#% 5 + 0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,#& 6 + 0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#' 7 + 0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,#( 8 + 0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,#) 9 + 0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,#* 10 + 0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,#+ 11 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,#, 12 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,#- 13 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,#. 14 + 0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,## 15 + 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,#0 16 + 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#1 17 + 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,#2 18 + 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,#3 19 + 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,#4 20 + 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,#5 21 + 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,#6 22 + 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,#7 23 + 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,#8 24 + 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,#9 25 + 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,#: 26 + 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,#; 27 + 0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,#< 28 + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,#= 29 + 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,#> 30 + 0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,#? 31 + 0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,#@ 32 + 0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,#A 33 + 0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,#B 34 + 0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,#C 35 + 0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,#D 36 + 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,#E 37 + 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,#F 38 + 0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,#G 39 + 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,#H 40 + 0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#I 41 + 0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,#J 42 + 0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,#K 43 + 0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,#L 44 + 0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,#M 45 + 0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,#N 46 + 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,#O 47 + 0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,#P 48 + 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,#Q 49 + 0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,#R 50 + 0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,#S 51 + 0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,#T 52 + 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,#U 53 + 0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,#V 54 + 0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,#W 55 + 0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,#X 56 + 0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,#Y 57 + 0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,#Z 58 + 0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,#[ 59 + 0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,#\ 60 + 0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,#] 61 + 0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#^ 62 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,#_ 63 + 0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#` 64 + 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,#a 65 + 0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,#b 66 + 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,#c 67 + 0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,#d 68 + 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,#e 69 + 0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#f 70 + 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,#g 71 + 0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,#h 72 + 0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#i 73 + 0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,#j 74 + 0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,#k 75 + 0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#l 76 + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,#m 77 + 0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,#n 78 + 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,#o 79 + 0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,#p 80 + 0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,#q 81 + 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,#r 82 + 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,#s 83 + 0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,#t 84 + 0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,#u 85 + 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,#v 86 + 0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,#w 87 + 0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,#x 88 + 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,#y 89 + 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,#z 90 + 0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,# 91 + 0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,#| 92 + 0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,# 93 + 0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#~ 94 +] + +BMP1=[ + 0x00,0x03,0x05,0x09,0x11,0xFF,0x11,0x89,0x05,0xC3,0x00,0xE0,0x00,0xF0,0x00,0xF8, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x28,0xFF,0x11,0xAA,0x44,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0x38,0x44,0x82,0x92, + 0x92,0x74,0x01,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x44,0xC7,0x01,0x7D, + 0x7D,0x7D,0x7D,0x01,0x7D,0x7D,0x7D,0x7D,0x01,0x7D,0x7D,0x7D,0x7D,0x01,0xFF,0x00, + 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x00, + 0x6D,0x6D,0x6D,0x6D,0x6D,0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x40,0x40, + 0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00, + 0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xDB,0xDB, + 0xDB,0xDB,0xDB,0x00,0x00,0xDA,0xDA,0xDA,0xDA,0xDA,0x00,0x00,0xD8,0xD8,0xD8,0xD8, + 0xD8,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00, + 0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x80, + 0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00, + 0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06, + 0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0xE6,0x66,0x20,0x00,0x06,0x06,0x86,0x06, + 0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x86,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00, + 0x00,0x86,0x86,0x86,0x86,0x86,0x80,0x80,0x86,0x86,0x06,0x86,0x86,0xC0,0xC0,0x86, + 0x86,0x86,0x06,0x06,0xD0,0x30,0x76,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06, + 0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06, + 0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x1C,0x00,0xFE,0x00,0x01, + 0x02,0x00,0xC4,0x18,0x20,0x02,0x9E,0x63,0xB2,0x0E,0x00,0xFF,0x81,0x81,0xFF,0x00, + 0x00,0x80,0x40,0x30,0x0F,0x00,0x00,0x00,0x00,0xFF,0x00,0x23,0xEA,0xAA,0xBF,0xAA, + 0xEA,0x03,0x3F,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x0C,0x08,0x00,0x00,0x01,0x01,0x01, + 0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x81,0x80,0x80,0x81,0x80, + 0x81,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x01,0x01,0x09,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0, + 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00, + 0x00,0x1E,0x21,0x40,0x40,0x50,0x21,0x5E,0x00,0x1E,0x21,0x40,0x40,0x50,0x21,0x5E, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xC1,0xC1,0xFF, + 0xFF,0xC1,0xC1,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0xFC,0xF3,0xEF,0xF3,0xFC, + 0x80,0xFF,0x80,0xEE,0xEE,0xEE,0xF5,0xFB,0xFF,0x9C,0xBE,0xB6,0xB6,0x88,0xFF,0x00 + ] + +#像素:64*64 +#列表大小:32*16 +BMP2=[ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0, + 0x60,0x38,0x08,0x0C,0x06,0xC2,0xE2,0x33,0x11,0xF9,0x11,0x33,0x73,0xE2,0x06,0x04, + 0x0C,0x18,0x30,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xF7, + 0x00,0x00,0x00,0x00,0x00,0xC3,0x87,0x06,0x0C,0xFF,0x0C,0x18,0x18,0xF0,0xE0,0x00, + 0x00,0x00,0x00,0x81,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x07,0x0C,0x18,0x30,0x30,0x61,0x63,0x46,0x46,0x5F,0x46,0x46,0x43,0x63,0x20,0x30, + 0x18,0x0C,0x06,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0xE0,0xE0,0xF0,0xE0,0xE0,0xC0,0x60,0x70,0x30,0x38,0x18,0x18,0x0C, + 0x0C,0x0C,0x66,0x66,0x66,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, + 0x66,0x66,0x0C,0x0C,0x0C,0x18,0x18,0x30,0x30,0x60,0xE0,0xE0,0x70,0x38,0x18,0x0C, + 0xFC,0xFC,0x1C,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xC7,0xFF,0x79,0x1B,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xC3,0xC3,0xC7,0x06,0x0C,0x18,0x70,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x83,0xFF,0x7F,0x00,0x00, + 0x00,0x00,0x00,0x03,0x07,0xFE,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xC0, + 0xC0,0xC0,0x60,0x60,0x30,0x30,0x18,0x1C,0x0E,0x06,0x03,0x03,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x3F,0x78,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0, + 0xFE,0xFE,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x1C,0x38,0xF0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xDC,0xFF,0xC3,0x01,0x01,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +] + +#32-32.bmp +BMP3=[ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0E,0x02,0x9B,0xBD,0xFF,0x65,0xED,0xCB, + 0x06,0x9C,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x60,0x61,0x23,0xF6,0xFD,0x7F,0x7F,0x7B,0x7D,0xF4, + 0xF6,0x23,0x60,0x60,0xC0,0xC0,0x60,0x60,0xE0,0x60,0x20,0x00,0x00,0x00,0x00,0x00, + 0x20,0xFF,0x8F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x1B,0x06,0x0C,0x18,0x90,0xF0,0x20, + 0x00,0x01,0x1F,0x7E,0xE0,0x80,0x80,0xA0,0xF0,0x30,0x20,0x20,0x20,0x20,0x20,0x20, + 0x60,0xC0,0x80,0x80,0xF0,0xF0,0x18,0x18,0x08,0x0C,0x04,0x06,0x03,0x01,0x01,0x00, +] diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/counter/haas506/code/main.py new file mode 100644 index 0000000000..0013d255a6 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/counter/haas506/code/main.py @@ -0,0 +1,106 @@ +from ssd1306 import SSD1306_128_64 +import utime as time +from driver import TIMER +from driver import GPIO +import aliyun + +disp=SSD1306_128_64() +time_d = [0x32, 0x35, 0x3a, 0x30, 0x30] # 倒计时 25:00 +print('time_d',time_d) + +#model= 0 自动连续计时; model = 1 手动重启计时 +model = 0 +tomato_count = 0 +count_data = {} +#实例化key1 +key1=GPIO(10,10) +key1.open("KEY1") +#按键中断回调函数 +def key1_callback(args): + global time_d + time_d = [0x32, 0x35, 0x3a, 0x30, 0x30] + ret = timer.start() + disp.oled_showstr(0,6,' ',1) + print(ret) + key1.disableIrq() + key1.clearIrq() + +def enable_key(): + #开启中断 + key1.enableIrq(key1_callback) + +# 初始化 +disp.begin() +#清屏 +disp.clear() +# 番茄时钟 OLED显示,每一秒刷一次 +def down_time(args): + global downtime_end,time_d,tomato_count,model + if time_d[4] > 0x30: + time_d[4] = time_d[4] - 1 + else: + time_d[4] = 0x39 + if time_d[3] > 0x30: + time_d[3] = time_d[3] - 1 + else: + time_d[3] = 0x35 + if time_d[1] > 0x30: + time_d[1] = time_d[1] - 1 + else: + time_d[1] = 0x39 + if time_d[0] > 0x30: + time_d[0] = time_d[0] - 1 + else: + downtime_end = 1 + time_d[0] = 0x30 + time_d[1] = 0x30 + time_d[3] = 0x30 + time_d[4] = 0x30 + tomato_count += 1 + #界面显示 + disp.oled_showstr(0,0,"count:",2) + disp.oled_showstr(55,0,str(tomato_count),2) + disp.oled_showstr(85,0,"md:",2) + disp.oled_showstr(110,0,str(model),2) + + count_data['count'] =tomato_count + aliyun.up_data(count_data) + print(model) + print(type(model)) + if model == 1: + disp.oled_showstr(0,6,'push key to begin',1) + timer.stop() + elif model ==0 : + time_d = [0x32, 0x35, 0x3a, 0x30, 0x30] #重置时间 + disp.oled_showmun(70,3,time_d,2) + disp.oled_showstr(0,3,"remain:",2) + +timer = TIMER(0) +timer.open(period=1000, mode=TIMER.PERIODIC, callback=down_time) + + +if __name__ == '__main__': + global downtime_end + models = model + timer.stop() + aliyun.connect() #连接阿里云 + #打开按键使能 + enable_key() + while aliyun.get_connect_state() == False: + time.sleep(0.1) + print('push key to begin') + #界面显示 + disp.oled_showstr(0,6,'push key to begin',1) + disp.oled_showstr(0,0,"count:",2) + disp.oled_showstr(55,0,str(tomato_count),2) + disp.oled_showstr(85,0,"md:",2) + disp.oled_showstr(110,0,str(model),2) + + aliyun.up_data({'count':0}) + aliyun.up_data({'model':0}) + while True: + time.sleep_ms(500) + model = aliyun.get_model() + if models != model: + disp.oled_showstr(110,0,str(model),2) + models = model diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/code/ssd1306.py b/haas_lib_bundles/python/docs/examples/counter/haas506/code/ssd1306.py new file mode 100644 index 0000000000..968db36547 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/counter/haas506/code/ssd1306.py @@ -0,0 +1,371 @@ + +import utime as time +import codetab + +# Constants +SSD1306_I2C_ADDRESS = 0x3C # 011110+SA0+RW - 0x3C or 0x3D +SSD1306_SETCONTRAST = 0x81 +SSD1306_DISPLAYALLON_RESUME = 0xA4 +SSD1306_DISPLAYALLON = 0xA5 +SSD1306_NORMALDISPLAY = 0xA6 +SSD1306_INVERTDISPLAY = 0xA7 +SSD1306_DISPLAYOFF = 0xAE +SSD1306_DISPLAYON = 0xAF +SSD1306_SETDISPLAYOFFSET = 0xD3 +SSD1306_SETCOMPINS = 0xDA +SSD1306_SETVCOMDETECT = 0xDB +SSD1306_SETDISPLAYCLOCKDIV = 0xD5 +SSD1306_SETPRECHARGE = 0xD9 +SSD1306_SETMULTIPLEX = 0xA8 +SSD1306_SETLOWCOLUMN = 0x00 +SSD1306_SETHIGHCOLUMN = 0x10 +SSD1306_SETSTARTLINE = 0x40 +SSD1306_MEMORYMODE = 0x20 +SSD1306_COLUMNADDR = 0x21 +SSD1306_PAGEADDR = 0x22 +SSD1306_COMSCANINC = 0xC0 +SSD1306_COMSCANDEC = 0xC8 +SSD1306_SEGREMAP = 0xA0 +SSD1306_CHARGEPUMP = 0x8D +SSD1306_EXTERNALVCC = 0x1 +SSD1306_SWITCHCAPVCC = 0x2 + +# Scrolling constants +SSD1306_ACTIVATE_SCROLL = 0x2F +SSD1306_DEACTIVATE_SCROLL = 0x2E +SSD1306_SET_VERTICAL_SCROLL_AREA = 0xA3 +SSD1306_RIGHT_HORIZONTAL_SCROLL = 0x26 +SSD1306_LEFT_HORIZONTAL_SCROLL = 0x27 +SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL = 0x29 +SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL = 0x2A + + +class SSD1306Base(object): + def __init__(self, width, height): + self.width = width + self.height = height + self._pages = height//8 + self._buffer = [0]*(width*self._pages) + # Handle hardware I2C + from driver import I2C + self._i2c=I2C() + self._i2c.open('OLED') + + + def _initialize(self): + raise NotImplementedError + + def writeCmd(self, command): + """Send command byte to display.""" + # I2C write. + control = 0x00 # Co = 0, DC = 0 + # writeBuf=bytearray(2) + # writeBuf[0]=control + # writeBuf[1]=command + # self._i2c.write(writeBuf) + + writeBuf=bytearray(1) + writeBuf[0]=command + self._i2c.memWrite(writeBuf,control,8) + + + def writeDat(self, data): + """Send byte of data to display.""" + # I2C write. + control = 0x40 # Co = 0, DC = 0 + # writeBuf=bytearray(2) + # writeBuf[0]=control + # writeBuf[1]=data + # self._i2c.write(writeBuf) + + writeBuf=bytearray(1) + writeBuf[0]=data + self._i2c.memWrite(writeBuf,control,8) + + def begin(self, vccstate=SSD1306_SWITCHCAPVCC): + """Initialize display.""" + # Save vcc state. + self._vccstate = vccstate + # Reset and initialize display. + # self.reset() + self._initialize() + # Turn on the display. + self.writeCmd(SSD1306_DISPLAYON) + +# -------------------------------------------------------------- +# Prototype : oled_fill(fill_data) +# Parameters : fill_data,范围0x00-0xff +# Description : 全屏填充,例如 0x00-全黑,0xff全亮 +# -------------------------------------------------------------- + def oled_fill(self,fill_data): + for i in range(8): + #page0-page1 + self.writeCmd(0xb0+i) + # low colum start address + self.writeCmd(0x00) + #high colum start address + self.writeCmd(0x10) + for i in range(128*64): + self.writeDat(fill_data) + +# -------------------------------------------------------------- +# Prototype : clear() +# Parameters : none +# Description : 全黑 +# -------------------------------------------------------------- + def clear(self): + self.oled_fill(0x00) + + + +# -------------------------------------------------------------- +# Prototype : oled_setPos(x,y) +# Parameters : x,y -- 起始点坐标(x:0~127, y:0~7) +# Description : 设置起始坐标 +# -------------------------------------------------------------- + def oled_setPos(self,x,y): + self.writeCmd(0xb0+y) + self.writeCmd(((x&0xf0)>>4)|0x10) + self.writeCmd((x&0x0f)|0x01) + +# -------------------------------------------------------------- +# Prototype : oled_showCN(x,y,n) +# Parameters : x,y -- 起始点坐标(x:0~127, y:0~7); N:汉字在codetab.h中的索引 +# Description : 显示codetab.py中的汉字,16*16点阵 +# -------------------------------------------------------------- + def oled_showCN(self,x,y,n): + self.oled_setPos(x,y) + adder=32*n + for i in range(16): + self.writeDat(codetab.F1[adder]) + adder+=1 + self.oled_setPos(x,y+1) + for i in range(16): + self.writeDat(codetab.F1[adder]) + adder+=1 + +# -------------------------------------------------------------- +# Prototype : oled_showStr(x,y,ch,TextSize) +# Parameters : x,y -- 起始点坐标(x:0~127, y:0~7); ch[] -- 要显示的字符串; TextSize -- 字符大小(1:6*8 ; 2:8*16) +# Description : 显示codetab.py中的ASCII字符,有6*8和8*16可选择 +# -------------------------------------------------------------- + + def oled_showmun(self,x,y,ch,TextSize): + c=0 + j=0 + if TextSize==1: + while ch[j]!='\0': + #ord()将字符转换成十进制,如'a'->97 + c=ch[j]-32 + if x>126: + x=0 + y+=1 + self.oled_setPos(x,y) + for i in range(6): + self.writeDat(codetab.F6x8[c][i]) + x+=6 + j+=1 + #防止index out of range + if j==len(ch): + break + if TextSize==2: + while ch[j]!='\0': + #ord()将字符转换成十进制 + c=ch[j]-32 + if x>120: + x=0 + y+=1 + self.oled_setPos(x,y) + for i in range(8): + self.writeDat(codetab.F8X16[c*16+i]) + self.oled_setPos(x,y+1) + for i in range(8): + self.writeDat(codetab.F8X16[c*16+i+8]) + x+=8 + j+=1 + #防止index out of range + if j==len(ch): + break + + + def oled_showstr(self,x,y,ch,TextSize): + c2=0 + j=0 + if TextSize==1: + while ch[j]!='\0': + #ord()将字符转换成十进制,如'a'->97 + c2=ord(ch[j])-32 + if x>126: + x=0 + y+=1 + self.oled_setPos(x,y) + for i in range(6): + self.writeDat(codetab.F6x8[c2][i]) + x+=6 + j+=1 + #防止index out of range + if j==len(ch): + break + if TextSize==2: + while ch[j]!='\0': + #ord()将字符转换成十进制,如'a'->97 + c2=ord(ch[j])-32 + if x>120: + x=0 + y+=1 + self.oled_setPos(x,y) + for i in range(8): + self.writeDat(codetab.F8X16[c2*16+i]) + self.oled_setPos(x,y+1) + for i in range(8): + self.writeDat(codetab.F8X16[c2*16+i+8]) + x+=8 + j+=1 + #防止index out of range + if j==len(ch): + break +# # -------------------------------------------------------------- +# Prototype : oled_showPicture(x0,y0,x1,y1,BMP) +# Parameters : x0,y0 -- 起始点坐标(x0:0~127, y0:0~7); x1,y1 -- 起点对角线(结束点)的坐标(x1:1~128,y1:128) +# Description : 显示BMP位图 +# -------------------------------------------------------------- + def oled_showPicture(self,x0,y0,x1,y1,BMP): + i=0 + if y1%8==0: + y=y1/8 + else: + y=y1/8+1 + for y in range(y0,y1): + self.oled_setPos(x0,y) + for x in range(x0,x1): + self.writeDat(BMP[i]) + i+=1 + if i==len(BMP) : + break + +# -------------------------------------------------------------- +# Prototype : set_contrast(contrast) +# Parameters : coontrast,取值范围为0-255 +# Description : 对比度/亮度调节 +# -------------------------------------------------------------- + def set_contrast(self, contrast): + if contrast < 0 or contrast > 255: + raise ValueError('Contrast must be a value from 0 to 255 (inclusive).') + self.writeCmd(SSD1306_SETCONTRAST) + self.writeCmd(contrast) + + +class SSD1306_128_64(SSD1306Base): + def __init__(self): + super(SSD1306_128_64, self).__init__(128, 64) + + def _initialize(self): + # 128x64 pixel specific initialization. + self.writeCmd(SSD1306_DISPLAYOFF) # 0xAE + self.writeCmd(SSD1306_SETDISPLAYCLOCKDIV) # 0xD5 + self.writeCmd(0x80) # the suggested ratio 0x80 + self.writeCmd(SSD1306_SETMULTIPLEX) # 0xA8 + self.writeCmd(0x3F) + self.writeCmd(SSD1306_SETDISPLAYOFFSET) # 0xD3 + self.writeCmd(0x0) # no offset + self.writeCmd(SSD1306_SETSTARTLINE | 0x0) # line #0 + self.writeCmd(SSD1306_CHARGEPUMP) # 0x8D + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x10) + else: + self.writeCmd(0x14) + self.writeCmd(SSD1306_MEMORYMODE) # 0x20 + self.writeCmd(0x00) # 0x0 act like ks0108 + self.writeCmd(SSD1306_SEGREMAP | 0x1) + self.writeCmd(SSD1306_COMSCANDEC) + self.writeCmd(SSD1306_SETCOMPINS) # 0xDA + self.writeCmd(0x12) + self.writeCmd(SSD1306_SETCONTRAST) # 0x81 + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x9F) + else: + self.writeCmd(0xCF) + self.writeCmd(SSD1306_SETPRECHARGE) # 0xd9 + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x22) + else: + self.writeCmd(0xF1) + self.writeCmd(SSD1306_SETVCOMDETECT) # 0xDB + self.writeCmd(0x40) + self.writeCmd(SSD1306_DISPLAYALLON_RESUME) # 0xA4 + self.writeCmd(SSD1306_NORMALDISPLAY) # 0xA6 + + +class SSD1306_128_32(SSD1306Base): + def __init__(self): + super(SSD1306_128_32, self).__init__(128, 32) + + def _initialize(self): + self.writeCmd(SSD1306_DISPLAYOFF) # 0xAE + self.writeCmd(SSD1306_SETDISPLAYCLOCKDIV) # 0xD5 + self.writeCmd(0x80) # the suggested ratio 0x80 + self.writeCmd(SSD1306_SETMULTIPLEX) # 0xA8 + self.writeCmd(0x1F) + self.writeCmd(SSD1306_SETDISPLAYOFFSET) # 0xD3 + self.writeCmd(0x0) # no offset + self.writeCmd(SSD1306_SETSTARTLINE | 0x0) # line #0 + self.writeCmd(SSD1306_CHARGEPUMP) # 0x8D + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x10) + else: + self.writeCmd(0x14) + self.writeCmd(SSD1306_MEMORYMODE) # 0x20 + self.writeCmd(0x00) # 0x0 act like ks0108 + self.writeCmd(SSD1306_SEGREMAP | 0x1) + self.writeCmd(SSD1306_COMSCANDEC) + self.writeCmd(SSD1306_SETCOMPINS) # 0xDA + self.writeCmd(0x02) + self.writeCmd(SSD1306_SETCONTRAST) # 0x81 + self.writeCmd(0x8F) + self.writeCmd(SSD1306_SETPRECHARGE) # 0xd9 + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x22) + else: + self.writeCmd(0xF1) + self.writeCmd(SSD1306_SETVCOMDETECT) # 0xDB + self.writeCmd(0x40) + self.writeCmd(SSD1306_DISPLAYALLON_RESUME) # 0xA4 + self.writeCmd(SSD1306_NORMALDISPLAY) # 0xA6 + + +class SSD1306_96_16(SSD1306Base): + def __init__(self): + super(SSD1306_96_16, self).__init__(96, 16) + + def _initialize(self): + self.writeCmd(SSD1306_DISPLAYOFF) # 0xAE + self.writeCmd(SSD1306_SETDISPLAYCLOCKDIV) # 0xD5 + self.writeCmd(0x60) # the suggested ratio 0x60 + self.writeCmd(SSD1306_SETMULTIPLEX) # 0xA8 + self.writeCmd(0x0F) + self.writeCmd(SSD1306_SETDISPLAYOFFSET) # 0xD3 + self.writeCmd(0x0) # no offset + self.writeCmd(SSD1306_SETSTARTLINE | 0x0) # line #0 + self.writeCmd(SSD1306_CHARGEPUMP) # 0x8D + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x10) + else: + self.writeCmd(0x14) + self.writeCmd(SSD1306_MEMORYMODE) # 0x20 + self.writeCmd(0x00) # 0x0 act like ks0108 + self.writeCmd(SSD1306_SEGREMAP | 0x1) + self.writeCmd(SSD1306_COMSCANDEC) + self.writeCmd(SSD1306_SETCOMPINS) # 0xDA + self.writeCmd(0x02) + self.writeCmd(SSD1306_SETCONTRAST) # 0x81 + self.writeCmd(0x8F) + self.writeCmd(SSD1306_SETPRECHARGE) # 0xd9 + if self._vccstate == SSD1306_EXTERNALVCC: + self.writeCmd(0x22) + else: + self.writeCmd(0xF1) + self.writeCmd(SSD1306_SETVCOMDETECT) # 0xDB + self.writeCmd(0x40) + self.writeCmd(SSD1306_DISPLAYALLON_RESUME) # 0xA4 + self.writeCmd(SSD1306_NORMALDISPLAY) # 0xA6 + diff --git a/haas_lib_bundles/python/docs/examples/counter/haas506/link_platform/counter.zip b/haas_lib_bundles/python/docs/examples/counter/haas506/link_platform/counter.zip new file mode 100644 index 0000000000..209b79e727 Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/counter/haas506/link_platform/counter.zip differ diff --git a/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/README.md b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/README.md new file mode 100644 index 0000000000..64368e22b6 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/README.md @@ -0,0 +1,256 @@ +# 居家隔离监控系统 +# 简介 +新型冠状病毒持续危害着人类安全,居家隔离可以有效切断病毒的传播路径。 + +本系统的核心在于监测居家隔离过程中入户门的开关状态,并及时通知给社区管理人员。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +AJ-SR04M- T-X超声波测距模块|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ + +# 代码流程 +1、连接阿里云平台。 + +2、重复检测超声波距离,当距离大于40cm设定开门状态为1,将开门的状态上传云端;当距离小与40cm设定开门状态为0,将开门状态上传云端。(每次状态改变时才上传一次)。 + +3、创建钉钉机器人,使用IoT Studio业务逻辑根据开门状态发送对应消息。 + + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/epidemic_prevention_control.zip),以下为手动添加的操作流程。 + +选择产品**功能定义**--**编辑草稿** +
+ +
+ +1、**添加自定义功能** +2、按照图2显示添加**标识符**与**数据类型**(标识符要与代码一致) +3、点击**发布上线** +
+ +
+ +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[居家隔离监控系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ + +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +## 3、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--门的状态改变后**打印当前距离和门的状态**。 +
+ +
+ +2、阿里云平台,打开**实时刷新**,物模型数值会即时改变。 +
+ +
+ +## 4、创建钉钉机器人 +群设置中找到智能群助手。 +
+ +
+ +添加机器人 +
+ +
+ +
+ +
+ +
+ +
+ +点击添加 +
+ +
+ +输入机器人名称及机器人想要添加的钉钉群组(如果没有可以自行创建),在安全设置一项添加"自定义关键词"。 + +需要注意的是:自定义关键词用来过滤向钉钉群推送的信息,只有包括了该关键词的推送信息才会在群里显示,不包含该关键词的推送信息会被过滤掉。可以定义多个关键词,只要推送的信息中有一个词跟关键词匹配即可被群接收并显示。这里我们定义"入户门"关键词,也就是说后续的推送信息里面必须包含"入户门"这个词语。 +提醒的两条消息“**入户门**关闭,疫情安全”,“**入户门**打开,危险” +
+ +
+ + 创建完成后会弹出提示框,点击``复制``按钮复制Webhook地址以备后用,使用该地址可以向钉钉群推送消息。点击“完成”。 +
+ +
+ +## 5、IoT Studio配置业务逻辑 +登录[IoT Studio](https://studio.iot.aliyun.com/projects?spm=a2cpu.b17028610.0.0.1a6f60b1uGkdFA)平台,在左侧的侧边栏点击项目管理,在项目管理页面点击新建项目按钮。 +
+ +
+ +在新建项目页面点击创建空白项目。 +
+ +
+ +弹出新建空白项目页面,输入项目名称及描述后点击确定按钮。 +
+ +
+ +项目创建完成后会自动导航到新创建的项目,新项目需要关联产品,设备,并创建业务逻辑,以实现云端上报信息到钉钉的信息推送。 + +点击关联设备 +
+ +
+ +
+ +
+ +创建业务逻辑 +
+ +
+ +业务服务创建完成后自动导航到业务逻辑开发页面。点击“节点”按钮显示所有原子功能,并以此拖住设备触发,条件判断 和 钉钉机器人到右侧的窗口。按住鼠标左键连接各个模块,注意条件判断两个逻辑输出要连接正确的钉钉机器人,以免逻辑混乱。 +
+ +
+ +点击设备触发模块,在弹出的对话框中选择产品,设备及触发条件。 +
+ +
+ +点击条件判断模块,在弹出的对话框中条件配置。 +
+ +
+ +点击疫情安全模块,在弹出的对话框中设置Webhook,选择配置方式及消息类型。Webhook对话框输入之前创建“疫情安全”钉钉机器人时候拷贝的字符串。在“消息类型”的内容配置项里填写content内容。(内容需要包括钉钉机器人设置的"自定义关键词") +
+ +
+ +按照上述办法配置疫情危险模块(使用相同的Webhook信息)。 +
+ +
+ +业务逻辑开发配置完成后,我们可以先使用软件调试的方式验证相关逻辑链路的正确性。点击保存按钮后点击部署调试按钮。 +
+ +
+ +在弹出的对话框选择前往按钮: +
+ +
+ +在弹出的设备模拟器页面点击启动设备模拟器按钮: +
+ +
+ + 选择属性上报选项并在开关状态栏输入0(门关闭)或者1(门打开),点击发送命令按钮: +
+ +
+ +发送命令后,我们便可以在钉钉群接收到相关的通知: +
+ +
+ + + + diff --git a/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/code/board.json new file mode 100644 index 0000000000..41756cb777 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/code/board.json @@ -0,0 +1,23 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "echo":{ + "type":"GPIO", + "port": 20, + "dir": "input", + "pull":"pullup" + }, + "trig":{ + "type":"GPIO", + "port": 19, + "dir": "output", + "pull":"pullup" + } + + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} + diff --git a/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/code/main.py new file mode 100644 index 0000000000..353ddf33e2 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/code/main.py @@ -0,0 +1,212 @@ +# coding=utf-8 +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + print('clound req data is {}'.format(request)) + + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +status_data = {} +def upload_status(n): + global status_data + status_data["open_door"]= n + status_data_str=ujson.dumps(status_data) + data={ + 'params':status_data_str + } + device.postProps(data) + + +#超声波测距 +def getData(): + TRIG.write(0) + #set period,above 50ms + time.sleep_ms(500) + TRIG.write(1) #Set TRIG as LOW + time.sleep_us(10) #Delay of 10us + TRIG.write(0) #Set TRIG as HIGH + + while ECHO.read()==0: #Check if Echo is LOW + pass + pulse_start = time.ticks_us() #Time of the last LOW pulse + + while ECHO.read()==1: #Check whether Echo is HIGH + pass + pulse_end = time.ticks_us() #Time of the last HIGH pulse + #print("pulse_duration",time.ticks_diff(pulse_end,pulse_start)) # us + pulse_duration = time.ticks_diff(pulse_end,pulse_start)/10000 #pulse duration: s + d=pulse_duration*340/2 + return d + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #替换下列产品信息 + ################################### + productKey = "your-productKey" + productSecret = "your-productSecret" + ################################### + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序 + time.sleep(2) + #creat instances + TRIG = GPIO() + ECHO = GPIO() + TRIG.open('trig') # Set pin as GPIO out + ECHO.open('echo') # Set pin as GPIO in + door_status = 0 + turn = 0 + try: + while True: + dis = getData() + if dis > 20 and dis < 600: + + if dis < 40: + door_status = 0 + if door_status != turn: + print ("distance:%0.2f cm" % dis) + print('door status changed:',door_status) + upload_status(door_status) + turn = door_status + else: + door_status = 1 + if door_status != turn: + print ("distance:%0.2f cm" % dis) + print('door status changed:',door_status) + upload_status(door_status) + turn = door_status + + else: + print ("Out Of Range") + except KeyboardInterrupt: + print("exit") + diff --git a/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/link_platform/epidemic_prevention_control.zip b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/link_platform/epidemic_prevention_control.zip new file mode 100644 index 0000000000..39aa8fa411 Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/epidemic_prevention_control/haas506/link_platform/epidemic_prevention_control.zip differ diff --git a/haas_lib_bundles/python/docs/examples/fire_detector/haas506/README.md b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/README.md new file mode 100644 index 0000000000..2bd65d38b9 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/README.md @@ -0,0 +1,319 @@ +# 火焰检测系统 +# 简介 +火力发电系统会持续对炉膛中煤的燃烧情况进行监控,防止出现煤熄灭的情况,本案例针对火力发电中防止煤熄灭的场景进行实时监控,如果煤熄灭就报警。 +当然也可以反向操作,作为对失火场景的监控。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +火焰传感器|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、重复读取火焰传感器电压,将数据上传阿里云。 + +3、使用**Web应用**功能,显示设备位置、火焰传感器电压变化、设备报警。 + +4、将报警信号发送至开发板,控制报警开关。 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/fire_detector.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ + +## 2、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[火焰检测系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印火焰传感器电压** +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +## 3、物联网应用开发 +以下是物联网应用开发流程,接下来按以下流程介绍Web端应用的开发。 +
+ +
+ +### 4.1新建‘普通项目’ + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)创建项目。 + - 在项目管理新建空白项目 +
+ +
+ +### 4.2创建‘Web应用’ + - 在新项目的首页新建一个Web应用 +
+ +
+ + - Web应用创建成功后自动跳转到应用界面设计页面。点击左侧栏‘组件’按钮图标,就可以看到可用的组件列表。各组件的说明请参考[IoT Studio组件说明](https://help.aliyun.com/document_detail/125196.html?spm=a2cpu.b17028610.0.0.17a360b1r241eh) +
+ +
+ +### 4.3页面设计 +添加三个组件: + + 实时曲线 显示火焰传感器电压数据变化 + 指示灯 提示报警状态 + 设备地图 显示设备位置 + + - 可以搜索组件,然后拖到画布区 +
+ +
+ +### 4.4关联产品 + - 在项目控制台,点击左侧‘产品’点击‘关联物联网平台产品’。并勾选‘关联产品同时关联其下所有设备’,以便该项目可以访问到所有设备的定位信息。 +
+ +
+ +
+ +
+ +### 4.5关联数据源 +关联数据源3个步骤: + + 关联产品 + 关联设备 + 关联属性 + + - 接下来对每个组件进行设置 +1、‘指示灯’,点击配置数据源。 +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + - 修改‘指示灯’展示样式,‘报警’/‘停止报警’用不同图片显示。(发电系统正常工作着火,熄火报警用灰色图标显示) +
+ +
+ + + - 火焰图片如下: + +
+ + +
+ + +2、同样方法设置‘实时曲线’显示当前的火焰传感器电压。 +
+ +
+ +3、‘设备地图’设置属性 +
+ +
+ + +给设备进行点位 +
+ +
+ +保存设备的位置信息,查看每个位置的设备信息。 +
+ +
+ +配置设备显示信息,再保存一次 +
+ +
+ +### 4.6业务逻辑开发 +业务逻辑的主要目的是让用户设定物联网设备端的行为逻辑,常规的物联网系统都是在设备端固化行为逻辑,出厂后修改设备行为需要OTA升级,需要与开发者沟通。云端的业务逻辑用户可以自行更改。 + + - 新建一条业务逻辑 +
+ +
+ + - 创建完成后,系统会自动进入到业务逻辑界面。点击节点开始逻辑设计。 +
+ +
+ + +逻辑需求,对上报的火焰传感器电压进行判断,高于设定数值报警,否则关闭报警。 +需要设定一下四个节点: + + 设备触发节点 + 条件判断节点 + 开启报警节点 + 关闭报警节点 +①从左侧拖出相应节点 +
+ +
+ +②建立节点间的关联关系,拖动鼠标将节点连接 +
+ +
+ +③业务逻辑编辑 + + 设备触发设置 +
+ +
+ + + 条件判断设置 + 用户可以在这个位置设定判断阈值 +
+ +
+ + + 设备行为设定 +
+ +
+ +
+ +
+ + + - 依次点击保存与部署 +
+ +
+ +### 4.7预览与发布上线 + - 返回到火焰监控报警界面,点击保存,点击预览后可以看到界面效果。 +
+ +
+ + - 可以看到设备位置,当前传感器状态,报警状态,传感器电压的变化曲线信息 +
+ +
+ +### 4.8在线调试 +通过阿里云平台在线调试也可以远程控制报警开关。 +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/fire_detector/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/code/board.json new file mode 100644 index 0000000000..74d4cfbc84 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/code/board.json @@ -0,0 +1,47 @@ +{ + "version": "2.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "serial1":{ + "type":"UART", + "port":0, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial2":{ + "type":"UART", + "port":1, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial3":{ + "type":"UART", + "port":2, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 + } + + \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/fire_detector/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/code/main.py new file mode 100644 index 0000000000..5f3e518040 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/code/main.py @@ -0,0 +1,186 @@ +# coding=utf-8 +from driver import ADC +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + params=request['params'] + params=eval(params) + warn = params["warning"] + onoff_data["warning"]= warn + onoff_data_str=ujson.dumps(onoff_data) + data1={ + 'params':onoff_data_str + } + device.postProps(data1) + + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + + +def upload_value(n): + global value_data + value_data["flame"]= n + value_data_str=ujson.dumps(value_data) + data={ + 'params':value_data_str + } + device.postProps(data) + + + + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序, + onoff_data = {} + onoff_data["warning"]= 0 + onoff_data_str=ujson.dumps(onoff_data) + data1={ + 'params':onoff_data_str + } + device.postProps(data1) + + #火焰传感器 + adc=ADC() + adc.open("ADC1") + value_data = {} + while True: + value=adc.readVoltage() + print('v:',value,) + print('--------------------------------------------') + upload_value(value) + time.sleep(1) + + adc.close() \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/fire_detector/haas506/link_platform/fire_detector.zip b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/link_platform/fire_detector.zip new file mode 100644 index 0000000000..564672796f Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/fire_detector/haas506/link_platform/fire_detector.zip differ diff --git a/haas_lib_bundles/python/docs/examples/gas_detector/haas506/README.md b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/README.md new file mode 100644 index 0000000000..8c9b41fc71 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/README.md @@ -0,0 +1,286 @@ +# 燃气检测系统 +# 简介 +天然气是家庭烹饪取暖主要燃料,其主要成分是甲烷(CH4),同时还含有少量的丙烷,乙烷、丁烷等其他少量气体。天然气本身无色无味,密度比空气少。天然气发生泄漏难以察觉,其在空气中浓度达到5%~15%时,遇明火会发生爆炸。家庭天然气的普及,每年因使用不当、人为因素造成燃气泄漏爆炸事故接连不断。 + 本案例就是以此背景教开发者一步一步打造燃气泄漏检测系统。 + + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +MQ2气体传感器|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、重复读取MQ2气体传感器电压,将数据上传阿里云。 + +3、使用**移动应用**功能,显示天气、MQ2气体传感器电压变化、设备报警。 +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/gas_detector.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[燃气检测系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印MQ2气体传感器电压** +
+ +
+ + +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ + +## 3、物联网应用开发 +以下是物联网应用开发流程,接下来按以下流程介绍移动端应用的开发。 +
+ +
+ + +### 3.1新建‘普通项目’ + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)创建项目。 + - 在项目管理新建空白项目 +
+ +
+ + +### 3.2关联产品和设备 +
+ +
+ +
+ +
+ +### 3.3新建‘移动应用’ +
+ +
+ +
+ +
+ +
+ +
+ + +点击上图红框中的‘组件’,就可以看到可用的组件列表。各组件的使用说明请参考[组件说明](https://help.aliyun.com/document_detail/181886.html) +### 3.4页面设计 +案例使用三个组件: + - 实时曲线 显示传感器实时数据 + - 指示灯 显示报警状态 + - 天气 用于显示目的地天气 + +将三个组件拖到中间画布区 +
+ +
+ +### 3.5关联数据源 +关联数据源分为如下三个步骤 +关联产品 +关联设备 +关联属性 +每个组件单独设置 +1、‘指示灯’组件设置 +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +设置好了之后,设置报警 +
+ +
+ +2、同样的方法设置‘实时曲线’。 +
+ +
+ +3、设置‘天气’组件,选择需要的地点。 + +
+ +
+ +### 3.6业务逻辑开发 +业务逻辑的主要目的是为了方便用户设定物联网设备端的行为逻辑,常规的物联网系统都是在设备端固话行为逻辑,出厂后如果需要修改设备行为,则需要进行OTA升级。 +新建一条燃气超阈值就报警的规则。 +
+ +
+ +系统自动进入到业务逻辑页面,点击左侧‘节点’,右侧是业务逻辑介绍。 +
+ +
+ +1、选择目标节点 +此逻辑需要判断设备上传的燃气电压值,当电压值超过阈值就打开报警,否则关闭报警。需要四个节点: + + - 设备触发节点 + - 条件判断节点 + - 开启报警灯节点 + - 关闭报警灯节点 + +分别从左侧拖出需要的节点。 + +
+ +
+ +2、建立节点间的关联关系,拖动鼠标将节点连接 +
+ +
+ +3、业务逻辑编辑 + + - 设备触发节点 +
+ +
+ + - 条件判断节点 +
+ +
+ +设备节点行为设定 +
+ +
+ +
+ +
+ +业务逻辑保存和部署 +
+ +
+ +### 3.7预览和发布上线 +业务逻辑设定完毕之后,可以在“燃气监控报警系统”页面‘’保存‘’并点击‘预览’进行预览。 +
+ +
+ +手机扫描二维码,可以在手机看查看数据。 +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/gas_detector/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/code/board.json new file mode 100644 index 0000000000..74d4cfbc84 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/code/board.json @@ -0,0 +1,47 @@ +{ + "version": "2.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "serial1":{ + "type":"UART", + "port":0, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial2":{ + "type":"UART", + "port":1, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial3":{ + "type":"UART", + "port":2, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 + } + + \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/gas_detector/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/code/main.py new file mode 100644 index 0000000000..e1349c1d4c --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/code/main.py @@ -0,0 +1,180 @@ +# coding=utf-8 +from driver import ADC +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#上传报警灯状态 +warning_data = {} +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + params=request['params'] + params=eval(params) + warn = params["alarmLight"] + warning_data["alarmLight"]= warn + warning_data_str=ujson.dumps(warning_data) + data1={ + 'params':warning_data_str + } + device.postProps(data1) + + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + + +def upload_value(n): + global value_data + value_data["gasVoltage"]= n + value_data_str=ujson.dumps(value_data) + data={ + 'params':value_data_str + } + device.postProps(data) + + + + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序 + #气体传感器 + adc=ADC() + adc.open("ADC1") + value_data = {} + while True: + value=adc.readVoltage() + print('v:',value) + print('--------------------------------------------') + upload_value(value) + time.sleep(1) + + adc.close() \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/gas_detector/haas506/link_platform/gas_detector.zip b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/link_platform/gas_detector.zip new file mode 100644 index 0000000000..ec12aaedbd Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/gas_detector/haas506/link_platform/gas_detector.zip differ diff --git a/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/README.md b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/README.md new file mode 100644 index 0000000000..3ff51bf28e --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/README.md @@ -0,0 +1,135 @@ +# 甲醛浓度检测系统 +# 简介 +甲醛是一种有特殊刺激气味的气体,对人的眼睛有强烈的刺激作用。若空气中甲醛浓度过高,比如新装修的房子、新买的汽车等,可引起中毒反应,严重的可致癌。家去拿时空气中的杀手之一,需要时刻提防。本案例的核心在于准确测量家庭中的甲醛浓度。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +电化学甲醛模组|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 + + - 使用TTL口下载完成后,用TTL口连接甲醛传感器进行数据读取。 + +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、上传云端报警状态,重复读取传感器数据,并上传云端。 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/hcho_detector.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ +
+ +
+ + + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + + - 搭建完后复制[甲醛浓度检测系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印读取的数字及PPM数值** +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +点击查看数据,可以看到每次上传的具体数值。 +
+ +
+ + diff --git a/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/code/board.json new file mode 100644 index 0000000000..4fc8f42eb0 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/code/board.json @@ -0,0 +1,38 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none" + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/code/main.py new file mode 100644 index 0000000000..714e97b835 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/code/main.py @@ -0,0 +1,170 @@ +# coding=utf-8 +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +from driver import UART + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + print('clound req data is {}'.format(request)) + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + +PPM_data = {} +def upload_PPM(): + global PPM_data,PPM + PPM_data["hcho"]= PPM + PPM_data_str=ujson.dumps(PPM_data) + data={ + 'params':PPM_data_str + } + device.postProps(data) + + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序 + time.sleep(2) + #UART初始化 + uart1=UART() + uart1.open("serial1") + readBuf=bytearray(9) + writeBuf=bytearray(9) + writeBuf = bytearray([0xFF,0x01,0x78,0x40,0x00,0x00,0x00,0x00,0x47]) + uart1.write(writeBuf) + while True: + #读取传感器数据并上传 + readSize=uart1.read(readBuf) + print(readBuf) + PPM = (int(readBuf[4])*256+int(readBuf[5]))/1000 + print(PPM) + upload_PPM() + time.sleep(1) + diff --git a/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/link_platform/hcho_detector.zip b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/link_platform/hcho_detector.zip new file mode 100644 index 0000000000..b19fdf11aa Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/hcho_detector/haas506/link_platform/hcho_detector.zip differ diff --git a/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/README.md b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/README.md new file mode 100644 index 0000000000..a587dad21b --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/README.md @@ -0,0 +1,254 @@ +# 家庭入侵报警系统 + +# 简介 + - 对于一些缺乏安全感的人而言,即使在家睡觉的时候也会担心会不会有人非法入侵到家里,对自己的人身和财产构成威胁。如果有一套便宜,便捷的入侵报警系统,能够在发现入侵人员的第一时间发出警报既能够起到威慑入侵者,让他们知难而退的作用,也能够第一时间通知到自己,起到提前准备自卫的作用,从而尽可能避免和减少损失。 + - 本案例通过一个5.8G雷达感应传感器模块来检测是否有人入侵,检测到了以后,就会通过一个蜂鸣器进行报警。同时为了避免误报,我们可以通过手机app来动态控制报警时间段以及开关警报的操作,让报警系统满足我们每个人的需求。 + +- 本案例**使用PWM端口来驱动蜂鸣器。** +无源蜂鸣器需要使用2k~5k频率的脉冲,HaaS506开发板上使用PWM0进行驱动。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +5.8G雷达感应传感器模块|1 +无源蜂鸣器|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、上传云端报警状态,报警开始时间与结束时间。 + +3、检测报警状态,当前时间和传感器状态,当同时满足三个条件,开始报警。 + +4、当关闭报警状态才能关掉报警系统。 + +5、上传云端下发的数据,实现设备端与云端数据统一。 +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/home_intrusion_alarm.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[家庭入侵报警系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印工作状态,当全部为真时开始报警** +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +## 3、物联网应用开发 +以下是物联网应用开发流程,接下来按以下流程介绍移动端应用的开发。 + +### 3.1新建‘普通项目’ + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)创建项目。 + - 在项目管理新建空白项目 +
+ +
+ +
+ +
+ + +### 3.2关联产品和设备 +
+ +
+ +
+ +
+ +### 3.3新建‘移动应用’ +
+ +
+ +
+ +
+ +
+ +
+ +点击上图红框中的‘组件’,就可以看到可用的组件列表。各组件的使用说明请参考[组件说明](https://help.aliyun.com/document_detail/181886.html) +### 3.4页面设计 +案例使用三个组件: +将三个组件拖到中间画布区 +
+ +
+ +1、文字编辑 +
+ +
+ +2、开关组件设置 +
+ +
+ +依次配置产品设备信息,开关用来控制‘’报警开关‘’,点击确定。 +
+ +
+ +3、数字框组件设置 +先配置组件数据来源,在设置交互 +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +配置交互完成 +
+ +
+ +同理,报警结束时间同样设置 +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +### 3.5预览和发布上线 +在页面‘’保存‘’并点击‘预览’进行预览。 +
+ +
+ +手机扫描二维码,可以在手机看查看数据。 +
+ +
+ +测试警报开关与工作时间 + + - 关闭警报开关,蜂鸣器无反应。 + - 打开警报开关,当前时间不在工作时间内,蜂鸣器无反应。 + - 打开警报开关,在工作时间内,传感器检测到人体活动,开始报警。 \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/board.json new file mode 100644 index 0000000000..6c7484dc9a --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/board.json @@ -0,0 +1,65 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "buzzer": { + "type": "PWM", + "port": 39 + }, + "radar":{ + "type":"GPIO", + "port": 17, + "dir": "input", + "pull":"pullup" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/bodyDetect.py b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/bodyDetect.py new file mode 100644 index 0000000000..536aca24da --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/bodyDetect.py @@ -0,0 +1,17 @@ +from driver import GPIO + +class BD(object): + + def __init__(self, gpioObj): + self.gpioObj = None + if not isinstance(gpioObj, GPIO): + raise ValueError("parameter is not a GPIO object") + + self.gpioObj = gpioObj + + def irDetect(self): + if self.gpioObj is None: + raise ValueError("invalid GPIO object") + + value = self.gpioObj.read() + return value diff --git a/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/main.py new file mode 100644 index 0000000000..d6ac47e9cb --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/code/main.py @@ -0,0 +1,226 @@ +# coding=utf-8 + +from driver import GPIO +from driver import PWM +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +import sntp +from bodyDetect import BD + + + +# 警报开关以及时间段控制(大于等于alarm_start 或者小于等于alarm_end ) +alarming = False + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global do_alarm,alarm_start,alarm_end,FLAG_ALARM_CONTROL,FLAG_ALARM_START,FLAG_ALARM_END + try: + props = eval(request['params']) + if FLAG_ALARM_CONTROL in props.keys(): + do_alarm = props[FLAG_ALARM_CONTROL] + print('on_props: do_alarm {}'.format(do_alarm)) + elif FLAG_ALARM_START in props.keys(): + alarm_start = props[FLAG_ALARM_START] + print('on_props: alarm_start {}'.format(alarm_start)) + elif FLAG_ALARM_END in props.keys(): + alarm_end = props[FLAG_ALARM_END] + print('on_props: alarm_end {}'.format(alarm_end)) + post_default_value() + except Excaption as e: + print(e) + + +value_data = {} +do_alarm = 1 +FLAG_ALARM_CONTROL = "alarm_control" +FLAG_ALARM_START = "alarm_start" +FLAG_ALARM_END = "alarm_end" +def post_default_value(): + global do_alarm,alarm_start,alarm_end,FLAG_ALARM_CONTROL,FLAG_ALARM_START,FLAG_ALARM_END + value_data[FLAG_ALARM_CONTROL]=do_alarm + value_data[FLAG_ALARM_START]=alarm_start + value_data[FLAG_ALARM_END]=alarm_end + data={ + 'params':ujson.dumps(value_data) + } + device.postProps(data) + print('---------------0----------------------') + + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +alarm_start = 8 +alarm_end = 20 +# 判断当前时间是否在有效时间段内 +def time_valid(): + global alarm_start,alarm_end + cur_hour = time.localtime()[3] + return (cur_hour >= alarm_start) and (cur_hour <= alarm_end) + + +def start_buzzers(duty_cycle): + param = {'freq':3000, 'duty': duty_cycle } + buzzers.setOption(param) + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + # 初始化蜂鸣器 + sntp.settime() #sntp 校时 + time.sleep(2) + buzzers = PWM() + buzzers.open("buzzer") + # 初始化人体传感器 + radar=GPIO() + radar.open('radar') + bd = BD(radar) + post_default_value() + while True: + print(''' + 报警状态:{}, + 报警工作时间:{}, + 检测到人体活动:{} + '''.format(do_alarm,time_valid(),bd.irDetect())) + if do_alarm == 1 and time_valid() and bd.irDetect() == 1: + print('human detected, start buzzer') + start_buzzers(50) + alarming = True + else: + print('-------------------') + if do_alarm == 0 and alarming: + print('close buzzer') + start_buzzers(100) + alarming = False + else: + pass + time.sleep(1) diff --git a/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/link_platform/home_intrusion_alarm.zip b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/link_platform/home_intrusion_alarm.zip new file mode 100644 index 0000000000..3358f02d76 Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/home_intrusion_alarm/haas506/link_platform/home_intrusion_alarm.zip differ diff --git a/haas_lib_bundles/python/docs/examples/human_detector/haas506/README.md b/haas_lib_bundles/python/docs/examples/human_detector/haas506/README.md new file mode 100644 index 0000000000..7b04f3cf2a --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/human_detector/haas506/README.md @@ -0,0 +1,138 @@ +# 起夜灯 +# 简介 +5.8G雷达感应传感器模块可以用来检测人体的存在/移动。使用传感器检测人体的移动,来控制灯光的亮灭。(使用人体热释电红外传感器也可以实现) + +
+ +
+ +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +5.8G雷达感应传感器模块|1 +SIM卡|1 +杜邦线|若干 + +# 硬件连接图 + + +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、传感器检测人体活动,控制灯光开关,并将灯光状态上传阿里云。 + +3、设置阿里云远端控制灯光亮灭。 + +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/human_detector.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** +
+ +
+ +设置标识符、数据类型、读写类型参数,标识符(light)要与代码保持一致。点击确定。 + +
+ +
+ + - 点击**发布上线** + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + + - 搭建完后复制[起夜灯代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**传感器每秒钟检测一次是否有人**,当检测到有人时LED灯亮起,打印‘detect body’ ;没有检测到人时LED灯灭,打印‘no body’。 +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ + + diff --git a/haas_lib_bundles/python/docs/examples/human_detector/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/human_detector/haas506/code/board.json new file mode 100644 index 0000000000..aa037ee865 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/human_detector/haas506/code/board.json @@ -0,0 +1,99 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "ADC2": { + "type": "ADC", + "port": 2, + "sampling": 12000000 + }, + "qma8981": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 18 + }, + "KEY1": { + "type": "GPIO", + "port": 44, + "dir": "irq", + "pull": "pullup", + "intMode": "rising" + }, + "led1": { + "type": "GPIO", + "port": 7, + "dir": "output", + "pull": "pulldown" + }, + "led_g": { + "type": "GPIO", + "port": 32, + "dir": "output", + "pull": "pulldown" + }, + "cs": { + "type": "GPIO", + "port": 15, + "dir": "output", + "pull": "pullup" + }, + "radar":{ + "type":"GPIO", + "port": 17, + "dir": "input", + "pull":"pullup" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/human_detector/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/human_detector/haas506/code/main.py new file mode 100644 index 0000000000..ab386d6034 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/human_detector/haas506/code/main.py @@ -0,0 +1,173 @@ +# coding=utf-8 + +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + + + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + params=request['params'] + params=eval(params) + light = params["light"] + led1.write(light) + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + +def upload_led(led): + global led_data + led_data["light"]= led + led_data_str=ujson.dumps(led_data) + data={ + 'params':led_data_str + } + device.postProps(data) + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #传感器操作 + led1=GPIO() + led1.open("led1") + radar=GPIO() + radar.open('radar') + led_data = {} + while True: + #当检测到人体活动,相应的引脚会输出高电平 + if radar.read()==1: + print("---------------------------detect body-------------------------------") + led1.write(1) + upload_led(1) + else: + print("no body") + led1.write(0) + upload_led(0) + time.sleep(1) + diff --git a/haas_lib_bundles/python/docs/examples/human_detector/haas506/link_platform/human_detector.zip b/haas_lib_bundles/python/docs/examples/human_detector/haas506/link_platform/human_detector.zip new file mode 100644 index 0000000000..e23175f0af Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/human_detector/haas506/link_platform/human_detector.zip differ diff --git a/haas_lib_bundles/python/docs/examples/noise_detector/haas506/README.md b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/README.md new file mode 100644 index 0000000000..7c1dde3c50 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/README.md @@ -0,0 +1,245 @@ +# 噪音检测系统 +# 简介 +当今社会,噪音污染已经影响到了人们日常生活的方方面面,办公室的噪音污染会影响员工的工作效率,生活中的噪音勿扰会影响大家的睡眠和情绪,从而影响我们的身心健康。 + +噪音检测系统目的是检测办公室和生活环境的噪音,当噪音超过设定的峰值时,发出报警。根据报警提示,办公室里的人可以通过降低打电话,讨论的声音,或者主动到会议室去,以避免打扰别人;家里的人也可以据此作出相应的对策,比如关门窗,联系物业或者警察等。 + +噪声标准 + + 1. 比较安静: 30~40 分贝 + 2. 影响睡眠和休息:50分贝以上 + 3. 影响工作效率: 70分贝以上 + 4. 严重影响听力或导致其他疾病: 长期生活在90分贝以上环境 + +为了检测室内环境中声音的大小,本场景的示意图如下图所示,场景设计的行为如下: + + 1. 通过声音传感器测量环境声音大小 + 2. 当声音低于90分贝时,根据不同的声音大小亮不同颜色的灯: + - 小于40分贝亮绿色 + - 50~70分贝亮蓝色 + - 大于70分贝亮红色 + 3. 当声音大于90分贝时打开蜂鸣器 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +MK002508声音传感器|1 +RGB三色LED灯|1 +蜂鸣器|1 +SIM卡|1 +杜邦线|若干 + +# 硬件连接图 + +
+ +
+ +# 代码流程 + +1、连接阿里云平台。 + +2、重复读取声音传感器数据,将数据上传阿里云。 + +3、使用**业务逻辑**功能,根据声音分贝数值控制对应灯光与蜂鸣器。 + +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/noise_detector.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ +- 添加自定义功能 + +- 添加标识符与数据类型(标识符要与代码一致) + +- 点击发布上线 + +
+ +
+ +-选择读写类型 +
+ +
+ + - 点击确定 +
+ +
+ + +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + + - 搭建完后复制[噪音检测系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**重复打印当前音量**。 +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +## 4、物联网应用开发 + + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)创建项目。 +### 4.1创建项目 + - 在项目管理新建空白项目 +
+ +
+ + +### 4.2关联产品和设备 +
+ +
+ +
+ +
+ +### 4.3业务逻辑开发 +业务逻辑的主要目的是为了方便用户设定物联网设备端的行为逻辑,常规的物联网系统都是在设备端固话行为逻辑,出厂后如果需要修改设备行为,则需要进行OTA升级。 +新建一条噪音监测的规则。 + +
+ +
+ +系统自动进入到业务逻辑页面,点击左侧‘节点’,右侧是业务逻辑介绍。 +
+ +
+ +本案例是个多分支的选择结构,需要用到多个条件判断。逻辑如下 +
+ +
+ +将所需节点拖入画布区,用线连接 +
+ +
+ +节点配置 +需要配置的节点比较多,一个一个来配置 +* 设备触发节点 +
+ +
+ +* 条件判断1 +
+ +
+ +* 条件判断2 +
+ +
+ +* 条件判断3 +
+ +
+ +* 设备1 +
+ +
+ +* 设备2 +
+ +
+ +* 设备3 +
+ +
+ +* 设备4 +
+ +
+ +### 4.4保存与部署 +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/noise_detector/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/code/board.json new file mode 100644 index 0000000000..19f63e2566 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/code/board.json @@ -0,0 +1,39 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "buzzer": { + "type": "PWM", + "port": 39 + }, + "red":{ + "type":"GPIO", + "port": 18, + "dir": "input", + "pull":"pullup" + }, + "green": { + "type": "GPIO", + "port": 17, + "dir": "output", + "pull": "pullup" + }, + + "blue": { + "type": "GPIO", + "port": 16, + "dir": "output", + "pull": "pullup" + } + + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} + diff --git a/haas_lib_bundles/python/docs/examples/noise_detector/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/code/main.py new file mode 100644 index 0000000000..1ecd68d055 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/code/main.py @@ -0,0 +1,262 @@ +# coding=utf-8 +from driver import ADC +from driver import GPIO +from driver import PWM +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +import math +import _thread + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +red = 0 +green = 0 +blue = 0 +bu = 0 +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global switch_buzzers,switch_red,switch_green,switch_blue,red,green,blue,bu + params=request['params'] + params=eval(params) + if "buzzer" in params: + switch_buzzers = params["buzzer"] + if switch_buzzers and switch_buzzers != bu: + print("buzzer - on") + bu = switch_buzzers + if "red_led" in params: + switch_red = params["red_led"] + if switch_red and switch_red != red: + print("red_led - on") + red = switch_red + if "green_led" in params: + switch_green = params["green_led"] + if switch_green and switch_green != green: + print("green_led - on") + green = switch_green + if "blue_led" in params: + switch_blue = params["blue_led"] + if switch_blue and switch_blue != blue: + print("blue_led - on") + blue = switch_blue + params.clear() + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +volume_data = {} +def upload_volume(n): + global volume_data + volume_data["sound"]= n + volume_data_str=ujson.dumps(volume_data) + data={ + 'params':volume_data_str + } + device.postProps(data) + +warn_data = {} +def upload_warn(): + global warn_data + warn_data["buzzer"]= 0 + warn_data["red_led"]= 0 + warn_data["green_led"]= 0 + warn_data["blue_led"]= 0 + warn_data_str=ujson.dumps(warn_data) + data={ + 'params':warn_data_str + } + device.postProps(data) + data.clear() + +#蜂鸣器 +buzzers = PWM() +buzzers.open("buzzer") +switch_buzzers = 0 +buzzer = 0 +def start_buzzers(): + global switch_buzzers,buzzer + if switch_buzzers == 1 and buzzer == 0: + param = {'freq':3000,'duty':50} + buzzers.setOption(param) + buzzer = 1 + if switch_buzzers == 0 and buzzer == 1: + param = {'freq':3000,'duty':100} + buzzers.setOption(param) + buzzer = 0 + + +#红灯 +led_red = GPIO() +led_red.open('red') +switch_red = 0 +def red_led(): + global switch_red + led_red.write(switch_red) + +#绿灯 +led_green = GPIO() +led_green.open('green') +switch_green = 0 +def green_led(): + global switch_green + led_green.write(switch_green) + +#蓝灯 +led_blue = GPIO() +led_blue.open('blue') +switch_blue = 0 +def blue_led(): + global switch_blue + led_blue.write(switch_blue) + + +def warning(): + global switch_blue,switch_green,switch_red,switch_buzzers + while True: + time.sleep_ms(200) + start_buzzers() + red_led() + green_led() + blue_led() + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #替换下列产品信息 + ################################### + productKey = "your-productKey" + productSecret = "your-productSecret" + ################################### + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序 + time.sleep(2) + # 检测光照 + adc=ADC() + adc.open("ADC1") + upload_warn() + # 创建警报线程 + _thread.start_new_thread(warning, ()) + while True: + volume=adc.readVoltage() + DB = 20*(math.log((volume/0.775), 10)) + upload_volume(DB) + print(DB) + time.sleep_ms(500) \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/noise_detector/haas506/link_platform/noise_detector.zip b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/link_platform/noise_detector.zip new file mode 100644 index 0000000000..111a923dbf Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/noise_detector/haas506/link_platform/noise_detector.zip differ diff --git a/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/README.md b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/README.md new file mode 100644 index 0000000000..de41c38b0e --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/README.md @@ -0,0 +1,150 @@ +# 雷达避障系统 +# 简介 +近年来,随着智能汽车、智能机器人的发展,雷达避障技术得到了较快的发展。避障雷达是防撞设备的辅助装置,可以根据需要对避障距离和避障范围进行调整。避障雷达通常安装在物体可移动方向的前部位置,用于探测物体移动方向前方障碍物横截面与自身的距离,由此来判断是否让物体减速或停止移动,从而避免发生碰撞。 + +本系统检测前方障碍物,当距离小与设定安全距离会发出警报,并将当前距离上传云端,提示采取相应措施,以避免发生碰撞。安全距离可以通过云端进行更改。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +AJ-SR04M- T-X超声波测距模块|1 +蜂鸣器|1 +SIM卡|1 +杜邦线|若干 + +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、开机将默认安全距离上传云端。 + +3、重复检测前方距离,当前方物体距离小与安全距离,蜂鸣器发出警报,并将数据上传阿里云。 + +4、传感器有效范围20cm-600cm,当超过这个范围无法检测正确距离。 + +5、可以通过云端自行设置蜂鸣器报警安全距离。 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/obstacle_avoidance.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ +
+ +
+ +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[雷达避障系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**打印安全距离**--**重复打印当前监测距离**。 + +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +3、通过在线调试更改安全距离 +
+ +
+ +
+ +
+ \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/code/board.json new file mode 100644 index 0000000000..3c12791f2f --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/code/board.json @@ -0,0 +1,27 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "buzzer": { + "type": "PWM", + "port": 39 + }, + "echo":{ + "type":"GPIO", + "port": 20, + "dir": "input", + "pull":"pullup" + }, + "trig":{ + "type":"GPIO", + "port": 19, + "dir": "output", + "pull":"pullup" + } + + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} + diff --git a/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/code/main.py new file mode 100644 index 0000000000..de46e1adf7 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/code/main.py @@ -0,0 +1,243 @@ +# coding=utf-8 +from driver import GPIO +from driver import PWM +import network +import _thread +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global safe_distance + params=request['params'] + params=eval(params) + if "safe_distance" in params: + safe_distance = params["safe_distance"] + print('safe_distance:',safe_distance) + upload_safe_distance(safe_distance) + + + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +distance_data = {} +def upload_distance(n): + global distance_data + distance_data["distance"]= n + distance_data_str=ujson.dumps(distance_data) + data={ + 'params':distance_data_str + } + device.postProps(data) + +warn_data = {} +def upload_safe_distance(safe): + global warn_data + warn_data["safe_distance"]= safe + warn_data_str=ujson.dumps(warn_data) + data1={ + 'params':warn_data_str + } + device.postProps(data1) + + +#蜂鸣器 +buzzers = PWM() +buzzers.open("buzzer") +switch_buzzers = 0 +buzzer = 0 +def start_buzzers(): + global switch_buzzers,buzzer + while True: + time.sleep_ms(200) + if switch_buzzers == 1 and buzzer == 0: + param = {'freq':3000,'duty':50} + buzzers.setOption(param) + buzzer = 1 + if switch_buzzers == 0 and buzzer == 1: + param = {'freq':3000,'duty':100} + buzzers.setOption(param) + buzzer = 0 + +#超声波测距 +def getData(): + TRIG.write(0) + #set period,above 50ms + time.sleep_ms(500) + TRIG.write(1) #Set TRIG as LOW + time.sleep_us(10) #Delay of 10us + TRIG.write(0) #Set TRIG as HIGH + + while ECHO.read()==0: #Check if Echo is LOW + pass + pulse_start = time.ticks_us() #Time of the last LOW pulse + + while ECHO.read()==1: #Check whether Echo is HIGH + pass + pulse_end = time.ticks_us() #Time of the last HIGH pulse + #print("pulse_duration",time.ticks_diff(pulse_end,pulse_start)) # us + pulse_duration = time.ticks_diff(pulse_end,pulse_start)/10000 #pulse duration: s + d=pulse_duration*340/2 + return d + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #替换下列产品信息 + ################################### + productKey = "your-productKey" + productSecret = "your-productSecret" + ################################### + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序 + time.sleep(2) + safe_distance = 50 + print('safe_distance:',safe_distance) + upload_safe_distance(safe_distance) + #creat instances + TRIG = GPIO() + ECHO = GPIO() + TRIG.open('trig') # Set pin as GPIO out + ECHO.open('echo') # Set pin as GPIO in + + _thread.start_new_thread(start_buzzers, ()) + try: + while True: + dis = getData() + if dis > 20 and dis < 600: + print ("distance:%0.2f cm" % dis) + if dis < safe_distance: + switch_buzzers = 1 + upload_distance(dis) + else: + switch_buzzers = 0 + else: + switch_buzzers = 0 + print ("Out Of Range") + except KeyboardInterrupt: + print("exit") + diff --git a/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/link_platform/obstacle_avoidance.zip b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/link_platform/obstacle_avoidance.zip new file mode 100644 index 0000000000..99243c027c Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/obstacle_avoidance/haas506/link_platform/obstacle_avoidance.zip differ diff --git a/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/README.md b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/README.md new file mode 100644 index 0000000000..ec5bf2446e --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/README.md @@ -0,0 +1,146 @@ +# 智能刷卡门禁系统 +# 简介 +使用MFRC522 RFID传感器与舵机制作的刷卡门禁系统。使用阿里云平台场景联动功能,只识别设定的卡号,简单实现多卡识别。满足小区使用场景。 +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +MFRC522 RFID传感器|1 +SG90舵机|1 +SIM卡|1 +RFID卡片|若干 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台 + +2、上报门禁状态 + +3、读RFID卡号,上传阿里云平台 + +4、云平台判断卡号,控制门禁 + +5,开门后等待时间,关闭门禁,上传门禁状态 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/rfid_open_door.zip),以下为手动添加的操作流程。 +选择产品**功能定义**--**编辑草稿** +
+ +
+ +1、**添加自定义功能** +2、按照图2显示添加**标识符**与**数据类型**(标识符要与代码一致) +3、点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ + +## 2、场景联动设定 +点击**规则引擎**--**场景联动**,点击**创建规则** +
+ +
+ +进行规则设定,如下图所示,云端识别到卡号,就发送一条开门命令。 +
+ +
+ +点击**保存** +
+ +
+ +## 3、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + - 搭建完后复制[智能刷卡门禁系统](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +## 4、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**刷卡会打印卡号**,如果是设定的卡片,会显示“open zhe door”,开门后3s舵机会再次转动,将门关闭。 +
+ +
+ +2、阿里云平台,打开**实时刷新**,刷卡后卡片号码会即时上报,刷到对应卡片开门会显示1,3s后变为0 。 +
+ +
+ \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/board.json new file mode 100644 index 0000000000..946e4ec3da --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/board.json @@ -0,0 +1,80 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "pwm_lpg": { + "type": "PWM", + "port": 3 + }, + "KEY1": { + "type": "GPIO", + "port": 44, + "dir": "irq", + "pull": "pullup", + "intMode": "rising" + }, + "led1": { + "type": "GPIO", + "port": 7, + "dir": "output", + "pull": "pulldown" + }, + "led_g": { + "type": "GPIO", + "port": 32, + "dir": "output", + "pull": "pulldown" + }, + "cs": { + "type": "GPIO", + "port": 15, + "dir": "output", + "pull": "pullup" + }, + "rst":{ + "type":"GPIO", + "port": 31, + "dir": "output", + "pull":"pullup" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 + } diff --git a/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/main.py new file mode 100644 index 0000000000..58780906bf --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/main.py @@ -0,0 +1,218 @@ +# coding=utf-8 + +from driver import GPIO +from driver import PWM +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +import mfrc522 + + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global servo_data + params=request['params'] + params=eval(params) + servo=params["open_door"] + servo_data={} + if servo ==1: + param2 = {'freq':50, 'duty': 12 } + pwm_lpg.setOption(param2) + print('open zhe door') + servo_data["open_door"]= 1 + servo_data_str=ujson.dumps(servo_data) + data={ + 'params':servo_data_str + } + device.postProps(data) + time.sleep(3) + print('-----------------------------------') + param2 = {'freq':50, 'duty': 5 } + pwm_lpg.setOption(param2) + time.sleep(1) + servo_data["open_door"]= 0 + servo_data_str=ujson.dumps(servo_data) + data={ + 'params':servo_data_str + } + device.postProps(data) + else: + pass +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + +def upload_uid(): + global uid_data + uid_data["rfid"]= uid + uid_data_str=ujson.dumps(uid_data) + data={ + 'params':uid_data_str + } + device.postProps(data) + + +def do_read(): + global uid,uid_data + rdr=mfrc522.MFRC522() + uid = '' + try: + while True: + (stat, tag_type) = rdr.request(rdr.REQIDL) + if stat == rdr.OK: + (stat, raw_uid) = rdr.anticoll() + if stat == rdr.OK: + uid=hex(raw_uid[0])[2:]+hex(raw_uid[1])[2:]+hex(raw_uid[2])[2:]+hex(raw_uid[3])[2:] + print(' - uid : ',uid) + upload_uid() + else: + print('read error') + time.sleep(1) + except KeyboardInterrupt: + print("Bye") + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #上报版本信息 + servo_data={} + pwm_lpg = PWM() + pwm_lpg.open("pwm_lpg") + param2 = {'freq':50, 'duty': 5 } + pwm_lpg.setOption(param2) + time.sleep(1) + servo_data["open_door"]= 0 + servo_data_str=ujson.dumps(servo_data) + data={ + 'params':servo_data_str + } + device.postProps(data) + + + print('witing read ------ ') + uid_data={} + do_read() + diff --git a/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/mfrc522.py b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/mfrc522.py new file mode 100644 index 0000000000..42ec547195 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/code/mfrc522.py @@ -0,0 +1,199 @@ + +from driver import SPI +from driver import GPIO + + +class MFRC522: + + OK = 0 + NOTAGERR = 1 + ERR = 2 + + REQIDL = 0x26 + REQALL = 0x52 + AUTHENT1A = 0x60 #验证A密钥 + AUTHENT1B = 0x61 #验证B密钥 + + + def __init__(self): + self.spi=SPI() + self.spi.open('SPI0') + self.rst=GPIO() + self.rst.open('rst') + self.rst.write(0) + self.rst.write(1) + self.init() + + def _wreg(self, reg, val): + writeBuf=bytearray([int(0xff & ((reg << 1) & 0x7e)),int(0xff & val)]) + self.spi.write(writeBuf,2) + + def _rreg(self, reg): + readBuf=bytearray(1) + writeBuf=bytearray([int(0xff & (((reg << 1) & 0x7e) | 0x80))]) + self.spi.write(writeBuf,1) + self.spi.read(readBuf,1) + return readBuf[0] + + def _sflags(self, reg, mask): + self._wreg(reg, self._rreg(reg) | mask) + + def _cflags(self, reg, mask): + self._wreg(reg, self._rreg(reg) & (~mask)) + + def _tocard(self, cmd, send): + + recv = [] + bits = irq_en = wait_irq = n = 0 + stat = self.ERR + + if cmd == 0x0E: + irq_en = 0x12 + wait_irq = 0x10 + elif cmd == 0x0C: + irq_en = 0x77 + wait_irq = 0x30 + + self._wreg(0x02, irq_en | 0x80) + self._cflags(0x04, 0x80) + self._sflags(0x0A, 0x80) + self._wreg(0x01, 0x00) + + for c in send: + self._wreg(0x09, c) + self._wreg(0x01, cmd) + + if cmd == 0x0C: + self._sflags(0x0D, 0x80) + + i = 2000 + while True: + n = self._rreg(0x04) + i -= 1 + if ~((i != 0) and ~(n & 0x01) and ~(n & wait_irq)): + break + + self._cflags(0x0D, 0x80) + + if i: + if (self._rreg(0x06) & 0x1B) == 0x00: + stat = self.OK + + if n & irq_en & 0x01: + stat = self.NOTAGERR + elif cmd == 0x0C: + n = self._rreg(0x0A) + lbits = self._rreg(0x0C) & 0x07 + if lbits != 0: + bits = (n - 1) * 8 + lbits + else: + bits = n * 8 + + if n == 0: + n = 1 + elif n > 16: + n = 16 + + for _ in range(n): + recv.append(self._rreg(0x09)) + else: + stat = self.ERR + + return stat, recv, bits + + def _crc(self, data): + self._cflags(0x05, 0x04) + self._sflags(0x0A, 0x80) + + for c in data: + self._wreg(0x09, c) + + self._wreg(0x01, 0x03) + + i = 0xFF + while True: + n = self._rreg(0x05) + i -= 1 + if not ((i != 0) and not (n & 0x04)): + break + + return [self._rreg(0x22), self._rreg(0x21)] + + def init(self): + self.reset() + self._wreg(0x2A, 0x8D) + self._wreg(0x2B, 0x3E) + self._wreg(0x2D, 30) + self._wreg(0x2C, 0) + self._wreg(0x15, 0x40) + self._wreg(0x11, 0x3D) + self.antenna_on() + + def reset(self): + self._wreg(0x01, 0x0F) + + def antenna_on(self, on=True): + if on and ~(self._rreg(0x14) & 0x03): + self._sflags(0x14, 0x03) + else: + self._cflags(0x14, 0x03) + + def request(self, mode): + self._wreg(0x0D, 0x07) + (stat, recv, bits) = self._tocard(0x0C, [mode]) + if (stat != self.OK) | (bits != 0x10): + stat = self.ERR + + return stat, bits + + def anticoll(self): + ser_chk = 0 + ser = [0x93, 0x20] + self._wreg(0x0D, 0x00) + (stat, recv, bits) = self._tocard(0x0C, ser) + if stat == self.OK: + if len(recv) == 5: + for i in range(4): + ser_chk = ser_chk ^ recv[i] + if ser_chk != recv[4]: + stat = self.ERR + else: + stat = self.ERR + return stat, recv + + def select_tag(self, ser): + buf = [0x93, 0x70] + ser[:5] + buf += self._crc(buf) + (stat, recv, bits) = self._tocard(0x0C, buf) + return self.OK if (stat == self.OK) and (bits == 0x18) else self.ERR + + def auth(self, mode, addr, sect, ser): + return self._tocard(0x0E, [mode, addr] + sect + ser[:4])[0] + + def stop_crypto1(self): + self._cflags(0x08, 0x08) + + def read(self, addr): #读块数据 + + data = [0x30, addr] + data += self._crc(data) + (stat, recv, _) = self._tocard(0x0C, data) + return recv if stat == self.OK else None + + def write(self, addr, data): + buf = [0xA0, addr] + buf += self._crc(buf) + (stat, recv, bits) = self._tocard(0x0C, buf) + if not (stat == self.OK) or not (bits == 4) or not ((recv[0] & 0x0F) == 0x0A): + stat = self.ERR + else: + buf = [] + for i in range(16): + buf.append(data[i]) + buf += self._crc(buf) + (stat, recv, bits) = self._tocard(0x0C, buf) + if not (stat == self.OK) or not (bits == 4) or not ((recv[0] & 0x0F) == 0x0A): + stat = self.ERR + + return stat + diff --git a/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/link_platform/rfid_open_door.zip b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/link_platform/rfid_open_door.zip new file mode 100644 index 0000000000..78015d01af Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/rfid_open_door/haas506/link_platform/rfid_open_door.zip differ diff --git a/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/README.md b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/README.md new file mode 100644 index 0000000000..659264ce1f --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/README.md @@ -0,0 +1,240 @@ +# 久坐提醒系统 +# 简介 +长期久坐会损害身体健康,本案例就是为了提醒人们不要坐太久而设计的一个提醒系统。当你长时间在工位上坐着,他会通过顶顶提醒你,让你每隔一段时间活动一下筋骨。久坐提醒设备是通过人体红外检测周围区域是否有人移动,当累计检测时长超过设定值,将会在钉钉群发来提醒,每次回到座位会重新开始计时。并且提醒时间可以自行调节,默认30分钟。 +## 人体红外传感器 + + - 传感器上有两个调节旋钮 + + 1、调节距离电位器顺时针旋转,感应距离增大,反之,感应距离减小。 + 2、调节延时电位器顺时针旋转,感应延时加长,反之,感应延时减短。 + +
+ +
+ +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +人体红外传感器|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、传感器检测人体活动,计算人体久坐时间,当时间超过设定值,将信号上传阿里云平台。 + +3、设置云端与钉钉机器人,当满足条件时发出提醒。 +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/sedentary_remind.zip),以下为手动添加的操作流程。 + +选择产品**功能定义**--**编辑草稿** +
+ +
+ + + - **添加自定义功能** + - 设置**标识符**、**数据类型**、**读写类型**参数,标识符(light)要与代码保持一致。点击**确定**。 + - **发布上线**,点击**确定**。 +
+ +
+ + +## 2、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[久坐提醒系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ + +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + + +## 3、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**打印根据传感器状态打印信息** +
+ +
+ + +2、阿里云平台,打开**实时刷新**,物模型会即时显示lLED当前状态。 +
+ +
+ + +## 4、钉钉消息提醒 +### 4.1添加钉钉机器人 +在钉钉创建一个群组并进入群设置→智能助手→添加机器人→自定义。 + + 1 +
+ +
+ + 2 +
+ +
+ + 3 +
+ +
+ + 4 +
+ +
+ + 5 +
+ +
+ + +**注意:自定义关键词要与平台物模型一致** +
+ +
+ +复制webhook地址,后面需要用到。 +
+ +
+ +### 4.2、IoT Studio设置 +进入[IoT Studio产品页](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1AlHtHl),开通服务后 +项目管理→新建项目 +
+ +
+ +
+ +
+ +添加关联产品、设备 +
+ +
+ +
+ +
+ +返回主页,新建空白业务逻辑。 +
+ +
+ +将节点拖入操作区 +
+ +
+ +节点用线连接。 +
+ +
+ +配置设备触发节点 +选择调试设备 +
+ +
+ + +配置钉钉机器人节点,复制钉钉webhook网址。 +
+ +
+ +依次点击保存、部署、发布。 +
+ +
+ +### 4.3 在线调试 +云平台在线调试发送数据1 +
+ +
+ +钉钉群发出消息 +
+ +
+ + diff --git a/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/code/board.json new file mode 100644 index 0000000000..5e47d46799 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/code/board.json @@ -0,0 +1,99 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "ADC2": { + "type": "ADC", + "port": 2, + "sampling": 12000000 + }, + "qma8981": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 18 + }, + "KEY1": { + "type": "GPIO", + "port": 44, + "dir": "irq", + "pull": "pullup", + "intMode": "rising" + }, + "led1": { + "type": "GPIO", + "port": 7, + "dir": "output", + "pull": "pulldown" + }, + "led_g": { + "type": "GPIO", + "port": 32, + "dir": "output", + "pull": "pulldown" + }, + "cs": { + "type": "GPIO", + "port": 15, + "dir": "output", + "pull": "pullup" + }, + "hc":{ + "type":"GPIO", + "port": 17, + "dir": "input", + "pull":"pullup" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/code/main.py new file mode 100644 index 0000000000..79b1f6556c --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/code/main.py @@ -0,0 +1,202 @@ +# coding=utf-8 +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +import sntp + + + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global warns + params=request['params'] + params=eval(params) + if 'warning' in params: + warns=params['warning'] + upload_interval() + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +interval_data = {} +def upload_interval(): + global interval_data,warns + interval_data["warning"]= warns + interval_data_str=ujson.dumps(interval_data) + data1={ + 'params':interval_data_str + } + device.postProps(data1) + + +turn = 0 +def every_second(): + global duration_time,begin_time,interval_time,turn,warns + if hc.read()==1: + if turn == 0: + now_time=time.time() #获取当前时间 + duration_time = (now_time - begin_time )/60 + print(round(duration_time,2)) + if int(duration_time) >= interval_time: + warns= 1 + upload_interval() + time.sleep_ms(500) + begin_time = time.time() #获取当前时间 + else: + begin_time = time.time() #获取当前时间 + turn = 0 + warns = 0 + else: + turn +=1 + warns = 0 + print('leave the seat') + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + # + interval = 0 #初始化提醒bool + interval_time = 30 #初始化提示时长 + time.sleep(2) + # 上传提醒 + warns = 0 + upload_interval() + #传感器使能 + hc=GPIO() + hc.open('hc') + sntp.settime() #sntp 校时 + begin_time=time.time() #获取当前时间 + + while True: + every_second() + time.sleep_ms(500) + + diff --git a/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/link_platform/sedentary_remind.zip b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/link_platform/sedentary_remind.zip new file mode 100644 index 0000000000..d819b48177 Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/sedentary_remind/haas506/link_platform/sedentary_remind.zip differ diff --git a/haas_lib_bundles/python/docs/examples/smart_fan/haas506/README.md b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/README.md new file mode 100644 index 0000000000..9077a6dcae --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/README.md @@ -0,0 +1,231 @@ +# 智能风扇 +# 简介 +日常生活中,我们经常需要一些通过风扇降温的场景,比如说机房,电脑主机等等。人为的去打开或者关闭风扇,调节档位,操作起来不是很方便。本案例通过一个温度传感器实时的采集当前温度,然后依据温度值,动态调节风扇速度。 +本案例通过一个温度传感器实时采集当前温度,然后依据温度值,动态的调节风扇的转速和开关,同时我们可以通过手机app实时的控制风扇转速所对应的温度档位,实现对风扇的远程控制,既能方便我们控制风扇,也能有效的节能,绿色环保。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +AHT10温湿度传感器|1 +电机模块|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、开机上传一次内置的温度阈值,并持续读取并上传当前温湿度传感器读取的温度数值 + +3、设置云端回调,接收来自云端的数据,更改程序中的判断数值 +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/smart_fan.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[智能风扇代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**重复打印当前温度,模式更改时打印更改的模式** +
+ +
+ +2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +## 3、物联网应用开发 +以下是物联网应用开发流程,接下来按以下流程介绍移动端应用的开发。 +### 3.1新建‘普通项目’ + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)创建项目。 + - 在项目管理新建空白项目 +
+ +
+ +
+ +
+ +### 3.2关联产品和设备 +
+ +
+ +
+ +
+ +### 3.3新建‘移动应用’ +
+ +
+ +
+ +
+ +点击上图红框中的‘组件’,就可以看到可用的组件列表。各组件的使用说明请参考[组件说明](https://help.aliyun.com/document_detail/181886.html) +### 3.4页面设计 +按顺序将组件从上到下拖到中间画布区 +
+ +
+ +**文本组件设置** +
+ +
+ + +**开关组件设置** + + - 配置数据源 +
+ +
+ +
+ +
+ + - 配置交互 +
+ +
+ +
+ +
+ +
+ +
+ +同样的方法,配置其他两个数字框 +
+ +
+ +
+ +
+ + - 数字框三 +
+ +
+ +
+ +
+ +**实时曲线组件设置** +
+ +
+ +
+ +
+ +### 3.5预览和发布上线 +在页面‘’保存‘’并点击‘预览’进行预览。 +
+ +
+ +手机扫描二维码,可以在手机进行设置并查看实时温度数据。 +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/ahtx0.py b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/ahtx0.py new file mode 100644 index 0000000000..1ebcb5148a --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/ahtx0.py @@ -0,0 +1,69 @@ +import utime as time +from driver import I2C + +#CONSTANTS +AHT10_ADDRESS = 0x38 # 0111000 (7bit address) +AHT10_READ_DELAY_MS = 75 # Time it takes for AHT to collect data +AHT_TEMPERATURE_CONST = 200 +AHT_TEMPERATURE_OFFSET = 50 +KILOBYTE_CONST = 1048576 +CMD_INITIALIZE = bytearray([0xE1, 0x08, 0x00]) +CMD_MEASURE = bytearray([0xAC, 0x33, 0x00]) +FARENHEIT_MULTIPLIER = 9/5 +FARENHEIT_OFFSET = 32 + +class AHT10: + def __init__(self, mode=0, address=AHT10_ADDRESS): + self.i2c = I2C() + self.i2c.open('aht10') + + self.address = address + writeBuf=bytearray(4) + writeBuf[0]=self.address + writeBuf[1]=CMD_INITIALIZE[0] + writeBuf[2]=CMD_INITIALIZE[1] + writeBuf[3]=CMD_INITIALIZE[2] + self.i2c.write(writeBuf) + + self.readings_raw = bytearray(8) + self.results_parsed = [0, 0] + self.mode = mode # 0 for Celsius(摄氏度), 1 for Farenheit(华氏度) + + def read_raw(self): + writeBuf=bytearray(4) + writeBuf[0]=self.address + writeBuf[1]=CMD_MEASURE[0] + writeBuf[2]=CMD_MEASURE[1] + writeBuf[3]=CMD_MEASURE[2] + self.i2c.write(writeBuf) + + time.sleep_ms(AHT10_READ_DELAY_MS) + readBuf=bytearray(6) + readBuf[0]=AHT10_ADDRESS + self.i2c.read(readBuf) + self.readings_raw[0]=readBuf[0] + self.readings_raw[1]=readBuf[1] + self.readings_raw[2]=readBuf[2] + self.readings_raw[3]=readBuf[3] + self.readings_raw[4]=readBuf[4] + self.readings_raw[5]=readBuf[5] + + self.results_parsed[0] = self.readings_raw[1] << 12 | self.readings_raw[2] << 4 | self.readings_raw[3] >> 4 + self.results_parsed[1] = (self.readings_raw[3] & 0x0F) << 16 | self.readings_raw[4] << 8 | self.readings_raw[5] + + def humidity(self): + self.read_raw() + return (self.results_parsed[0] / KILOBYTE_CONST) * 100 + + def temperature(self): + self.read_raw() + if self.mode is 0: + return (self.results_parsed[1] / KILOBYTE_CONST) * AHT_TEMPERATURE_CONST - AHT_TEMPERATURE_OFFSET + else: + return ((self.results_parsed[1] / KILOBYTE_CONST) * AHT_TEMPERATURE_CONST - AHT_TEMPERATURE_OFFSET) * FARENHEIT_MULTIPLIER + FARENHEIT_OFFSET + + def set_mode(self, mode): + if mode==0 or mode==1: + self.mode = mode + else: + raise ValueError('Mode must be either 0 for Celsius or 1 Farenheit') diff --git a/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/board.json new file mode 100644 index 0000000000..85e0c44502 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/board.json @@ -0,0 +1,65 @@ +{ + "name": "haas506", + "version": "1.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "pwm_pwm": { + "type": "PWM", + "port": 39 + }, + "pwm_lpg": { + "type": "PWM", + "port": 3 + }, + "aht10": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 56 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/main.py new file mode 100644 index 0000000000..246fe77971 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/code/main.py @@ -0,0 +1,241 @@ +# coding=utf-8 +from ahtx0 import AHT10 +from driver import PWM +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + + +# 警报开关以及时间段控制 +gear1_temp = 22 +gear2_temp = 27 +gear3_temp = 32 +FLAG_CUR_TEMP = "temp" +FLAG_GEAR1 = "gear1" +FLAG_GEAR2 = "gear2" +FLAG_GEAR3 = "gear3" +cur_gear = 0 + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global FLAG_GEAR1, FLAG_GEAR2, FLAG_GEAR3,FLAG_CUR_TEMP,gear1_temp, gear2_temp, gear3_temp,temp + params=request['params'] + data_all=eval(params) + if FLAG_GEAR1 in data_all : + gear1_temp = data_all[FLAG_GEAR1] + value_gears() + if FLAG_GEAR2 in data_all : + gear2_temp = data_all[FLAG_GEAR2] + value_gears() + if FLAG_GEAR3 in data_all : + gear3_temp = data_all[FLAG_GEAR3] + value_gears() + if FLAG_CUR_TEMP in data_all: + temp = data_all[FLAG_CUR_TEMP] + upload_temp() + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + +def upload_date(key_value): + data_str=ujson.dumps(key_value) + data={ + 'params':data_str + } + device.postProps(data) + value_data.clear() + + +value_data = {} +def upload_temp(): + global value_data,temp,FLAG_CUR_TEMP + value_data[FLAG_CUR_TEMP]=temp + upload_date(value_data) + +def value_gears(): + global FLAG_GEAR1,FLAG_GEAR2,FLAG_GEAR3,gear1_temp, gear2_temp, gear3_temp,value_data + value_data[FLAG_GEAR1]=gear1_temp + upload_date(value_data) + value_data[FLAG_GEAR2]=gear2_temp + upload_date(value_data) + value_data[FLAG_GEAR3]=gear3_temp + upload_date(value_data) + +#电机控制 +def control(gear): + if not isinstance(gear,int): + raise ValueError("gear is not an int object") + if not gear in range(4): + raise ValueError("gear must be in range 0-3") + if gear == 0: + duty= 0 + if gear == 1: + duty= 33 + if gear == 2: + duty= 66 + if gear == 3: + duty= 99 + param = {'freq':3000, 'duty': duty } + pwm_pwm.setOption(param) + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序 + time.sleep(2) + value_gears() + print('start work') + #初始化温度传感器 + a=AHT10() + #set mode(℃ or F) + a.set_mode(0) + #初始化电机模块 + pwm_pwm = PWM() + pwm_pwm.open("pwm_pwm") + while True: + time.sleep_ms(200) + temp = a.temperature() #获取温度信息 + print('cur temp is {}'.format(temp)) + upload_temp() + if temp <= gear1_temp and cur_gear != 0: + cur_gear = 0 + control(cur_gear) + print('fan change to gear {}'.format(cur_gear)) + elif temp > gear1_temp and temp <= gear2_temp and cur_gear != 1: + cur_gear = 1 + control(cur_gear) + print('fan change to gear {}'.format(cur_gear)) + elif temp > gear2_temp and temp <= gear3_temp and cur_gear != 2: + cur_gear = 2 + control(cur_gear) + print('fan change to gear {}'.format(cur_gear)) + elif temp > gear3_temp and cur_gear != 3: + cur_gear = 3 + control(cur_gear) + print('fan change to gear {}'.format(cur_gear)) + diff --git a/haas_lib_bundles/python/docs/examples/smart_fan/haas506/link_platform/smart_fan.zip b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/link_platform/smart_fan.zip new file mode 100644 index 0000000000..033ec7c5fa Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/smart_fan/haas506/link_platform/smart_fan.zip differ diff --git a/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/README.md b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/README.md new file mode 100644 index 0000000000..106ede2659 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/README.md @@ -0,0 +1,167 @@ +# 智能路灯系统 +# 简介 +本案例打造的智能路灯系统能检测周围环境的明亮变化。光线变暗灯就会打开,光线变亮灯关闭。路灯控制系统默认设置一个亮度阈值,阈值数值100 ,可以在阿里云“场景联动”功能中更改。 +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +BH1750光照强度传感器|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、重复读取光照强度,将数据上传阿里云。 + +3、使用**场景联动**功能,根据光照强度执行开灯或关灯逻辑。 + +4、将开关灯逻辑发送至开发板,控制路灯开关。 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/smart_public_lighting.zip),以下为手动添加的操作流程。 +选择产品**功能定义**--**编辑草稿** +
+ +
+ +1、**添加自定义功能** +2、添加**标识符**与**数据类型**(标识符要与代码一致) +3、点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ + +## 2、场景联动设定 +点击**规则引擎**--**场景联动**,点击**创建规则** +
+ +
+ +创建关灯联动规则 +
+ +
+ +进行规则设定,点击**保存** +
+ +
+ + + +创建开灯联动规则 +
+ +
+ +进行规则设定,点击**保存** +
+ +
+ +启动场景联动 +
+ +
+ + +## 3、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + + - 搭建完后复制[智能路灯代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +## 4、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**每秒打印光照强度**,改变光照强度,光照低于100灯会亮起,高于100灯关闭。 +
+ +
+ + +2、阿里云平台,打开**实时刷新**,物模型数值会即时改变。 +
+ +
+ +通过在线调试,也可以短暂关闭或开启灯光。 +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/code/board.json new file mode 100644 index 0000000000..66d82dcaa4 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/code/board.json @@ -0,0 +1,107 @@ +{ + "name": "haas506", + "version": "1.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "led1": { + "type": "GPIO", + "port": 7, + "dir": "output", + "pull": "pullup" + }, + "mpu6050": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 105 + }, + "BH1750": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 35 + }, + "KEY1": { + "type": "GPIO", + "port": 44, + "dir": "irq", + "pull": "pullup", + "intMode": "rising" + }, + "work_led": { + "type": "GPIO", + "port": 0, + "dir": "output", + "pull": "pulldown" + }, + "net_led": { + "type": "GPIO", + "port": 7, + "dir": "output", + "pull": "pulldown" + }, + "cloud_led": { + "type": "GPIO", + "port": 9, + "dir": "output", + "pull": "pulldown" + }, + "d2_led": { + "type": "GPIO", + "port": 6, + "dir": "output", + "pull": "pulldown" + }, + "d3_led": { + "type": "GPIO", + "port": 8, + "dir": "output", + "pull": "pulldown" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1":{ + "type":"UART", + "port":0, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial2":{ + "type":"UART", + "port":1, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial3":{ + "type":"UART", + "port":2, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} + diff --git a/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/code/main.py new file mode 100644 index 0000000000..9691fa290a --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/code/main.py @@ -0,0 +1,202 @@ +# coding=utf-8 +from driver import I2C +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + +#指令相应参数 +DEVICE = 0x23 +POWER_DOWN = 0x00 +POWER_ON = 0x01 +RESET = 0x07 + +CONTINUOUS_LOW_RES_MODE = 0x13 +CONTINUOUS_HIGH_RES_MODE_1 = 0x10 +CONTINUOUS_HIGH_RES_MODE_2 = 0x11 +ONE_TIME_HIGH_RES_MODE_1 = 0x20 +ONE_TIME_HIGH_RES_MODE_2 = 0x21 +ONE_TIME_LOW_RES_MODE = 0x23 +BH=I2C() +BH.open('BH1750') +gpio=GPIO() +gpio.open('led1') +light_data = {} +onoff_data = {} + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + params=request['params'] + params=eval(params) + light = params["onoff"] + light_con(light) + onoff_data["onoff"]= light + onoff_data_str=ujson.dumps(onoff_data) + data1={ + 'params':onoff_data_str + } + device.postProps(data1) + + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +def convertToNumber(data): + return ((data[1] + (256 * data[0])) / 1.2) + +def readLight(): + global BH + readBuf=bytearray(2) + #尝试更换不同模式 + readBuf[0]=CONTINUOUS_HIGH_RES_MODE_1 + BH.read(readBuf,2) + return convertToNumber(readBuf) + + +def upload_light(n): + global light_data + light_data["brightness"]= n + light_data_str=ujson.dumps(light_data) + data={ + 'params':light_data_str + } + device.postProps(data) + + +def light_con(m): + gpio.write(m) + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #主程序,光强传感器 + while True: + lig_data = int(readLight()) + print ("Light Level : " + str(lig_data) + " lx") + upload_light(lig_data) + time.sleep(1) diff --git a/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/link_platform/smart_public_lighting.zip b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/link_platform/smart_public_lighting.zip new file mode 100644 index 0000000000..7e38d57ecb Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/smart_public_lighting/haas506/link_platform/smart_public_lighting.zip differ diff --git a/haas_lib_bundles/python/docs/examples/sound_led/haas506/README.md b/haas_lib_bundles/python/docs/examples/sound_led/haas506/README.md new file mode 100644 index 0000000000..14cd55da5a --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/sound_led/haas506/README.md @@ -0,0 +1,129 @@ +# 声控灯 +# 简介 +声控灯是通过声音控制开关的技术,适用于使用声音控制开灯的场景,特别是楼宇、住宅的公共场合,它可以减少人工开关电灯的麻烦,解放双手,避免双手接触公共开关,降低接触细菌的可能,疫情器件更是可以减少很多麻烦。 +本案例实现一个简单的灯光控制功能,并把不同的灯光效果上传云端。 + +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +声音传感器|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、检测到声音时,轮流出现不同的灯光效果 + +3、将相应的效果上传云端 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/sound_led.zip),以下为手动添加的操作流程。 +选择产品**功能定义**--**编辑草稿** +
+ +
+ +**添加自定义功能** +
+ +
+ +设置**标识符**、**数据类型**、**读写类型**参数,标识符(light)要与代码保持一致。点击**确定**。 + - **发布上线**,点击**确定**。 +
+ +
+ +
+ +
+ + +## 2、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + - 搭建完后复制[声控灯代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +## 3、调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功**--**当声音超过阈值,开启LED,每次开启不同模式** +
+ +
+ +2、阿里云平台,打开**实时刷新**,物模型会即时显示lLED当前状态。 +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/sound_led/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/sound_led/haas506/code/board.json new file mode 100644 index 0000000000..c97a71ed17 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/sound_led/haas506/code/board.json @@ -0,0 +1,100 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "ADC0": { + "type": "ADC", + "port": 0, + "sampling": 12000000 + }, + "ADC1": { + "type": "ADC", + "port": 1, + "sampling": 12000000 + }, + "qma8981": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 18 + }, + "KEY1": { + "type": "GPIO", + "port": 44, + "dir": "irq", + "pull": "pullup", + "intMode": "rising" + }, + "led1": { + "type": "GPIO", + "port": 1, + "dir": "output", + "pull": "pulldown" + }, + "led2": { + "type": "GPIO", + "port": 7, + "dir": "output", + "pull": "pulldown" + }, + "led3": { + "type": "GPIO", + "port": 6, + "dir": "output", + "pull": "pulldown" + }, + "cs": { + "type": "GPIO", + "port": 15, + "dir": "output", + "pull": "pullup" + }, + "radar":{ + "type":"GPIO", + "port": 17, + "dir": "input", + "pull":"pullup" + }, + "SPI0": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 2000000 + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort": 0 +} diff --git a/haas_lib_bundles/python/docs/examples/sound_led/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/sound_led/haas506/code/main.py new file mode 100644 index 0000000000..24cbd5e934 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/sound_led/haas506/code/main.py @@ -0,0 +1,259 @@ +# coding=utf-8 +from driver import ADC +from driver import GPIO +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv +import _thread + + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global state + params=request['params'] + params=eval(params) + if 'light'in params: + upload_led(state) + else: + pass + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +led_data = {} +def upload_led(led): + global led_data + led_data["light"]= led + led_data_str=ujson.dumps(led_data) + data={ + 'params':led_data_str + } + device.postProps(data) + +gNumber = 0 +onoff = 0 +def open_all_led(): + global gNumber,onoff + while True: + time.sleep_ms(100) + if onoff ==1: + if gNumber == 0: + # 开LED1 + led3.write(0) + led1.write(1) + elif gNumber == 1: + # 开LED2 + led1.write(0) + led2.write(1) + else: + # 开LED3 + led2.write(0) + led3.write(1) + gNumber += 1 + gNumber %= 3 + else: + pass + +state = 0 +num = 1 +def led_open(): + global state,onoff,num + if num == 1: + state = num + num =2 + # 开LED1 + led1.write(1) + elif num == 2: + state = num + num = 3 + # 开LED2 + led2.write(1) + elif num == 3: + state = num + num = 4 + # 开LED3 + led3.write(1) + else : + state = num + num = 1 + # 全开 + onoff = 1 + print('state',state) + upload_led(state) + + +def led_close(): + global onoff,state + led1.write(0) + led2.write(0) + led3.write(0) + onoff = 0 + state = 0 + upload_led(state) + +openLed = False +def voice_thread(): + global openLed + while True: + time.sleep_ms(10) + value=voice.readVoltage() + if value <= 1520 and openLed == False: + print("声波转换后的值%s"% (value)) + openLed = True + print('open led-------------------------') + led_open() + # 亮灯6秒 + time.sleep_ms(6000) + # 关灯 + led_close() + print('-------------------------close led') + openLed = False + + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #传感器操作 + led1=GPIO() + led1.open("led1") + led2=GPIO() + led2.open("led2") + led3=GPIO() + led3.open("led3") + voice=ADC() + voice.open('ADC1') + print('----------------test begin-------------------') + try: + # 创建声音采集线程 + _thread.start_new_thread(voice_thread, ()) + _thread.start_new_thread(open_all_led, ()) + except: + print('main thread error...') + + while True: + time.sleep(1) diff --git a/haas_lib_bundles/python/docs/examples/sound_led/haas506/link_platform/sound_led.zip b/haas_lib_bundles/python/docs/examples/sound_led/haas506/link_platform/sound_led.zip new file mode 100644 index 0000000000..48689389f8 Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/sound_led/haas506/link_platform/sound_led.zip differ diff --git a/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/README.md b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/README.md new file mode 100644 index 0000000000..91c0c8fd22 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/README.md @@ -0,0 +1,209 @@ +# GPS定位系统 + +# 简介 +GPS为GlobalPositioningSystem(全球定位系统 )的缩写。实际上 ,这是一种全球性无线电卫星导航系统 ,由 2 4个人造卫星星座及其地面接收站组成。GPS就是利用人造卫星这类“人造星体”作为参考点来确定一个物体的位置 ,其精确程度达几米到几十米。 +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +GNSS定位模块 HT2828Z3G5L|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 + + - 使用先使用TTL口下载程序,下载完了之后TTL口连接GPS模块。 +
+ +
+ +# 代码流程 + +1、连接阿里云平台。 + +2、读取GPS位置信息,上传经纬度上阿里云。 + +3、阿里云‘Web应用’显示位置信息。 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ + +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/vehicle_location.zip),以下为手动添加的操作流程。 + + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** +设置**标识符**、**数据类型**、**读写类型**参数,标识符要与代码保持一致。点击**确定**。 + **发布上线**,点击**确定**。 +
+ +
+ +
+ +
+ +3、产品发布,动态注册一定要打开。 +
+ +
+ + - 全部打钩,点击发布 +
+ +
+ +## 2、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + - 搭建完后复制[GPS定位系统代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 +
+ +
+ + 修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + +## 3、调试 +1、由于TTL串口需要连接GPS模块,使用USB port5号口对应串口读取log + +串口调试工具log,**传感器每秒钟打印GPS读取信息**。 +
+ +
+ +## 4、Web应用 + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)实现设备位置在地图上实时显示。 +### 新建‘普通项目’ + - 在项目管理新建空白项目 +
+ +
+ +
+ +
+ +
+ +
+ +### 关联产品 + - 在项目控制台,点击左侧‘产品’点击‘关联物联网平台产品’。并勾选‘关联产品同时关联其下所有设备’,以便该项目可以访问到所有设备的定位信息。 +
+ +
+ +
+ +
+ +### 创建‘Web应用’ + - 返回上一页,在项目控制台,在新项目的首页新建一个Web应用 +
+ +
+ + - Web应用创建成功后自动跳转到应用界面设计页面。点击左侧栏‘组件’按钮图标,就可以看到可用的组件列表。各组件的说明请参考[IoT Studio组件说明](https://help.aliyun.com/document_detail/125196.html?spm=a2cpu.b17028610.0.0.17a360b1r241eh) + - 为了能够将设备显示在地图上,选用‘设备地图’组件。鼠标悬停在组件上可以查看详细信息。 +
+ +
+ + - 将‘设备地图’组件拖拽至画布,并调整大小。点击右侧‘编辑设备地图’ +
+ +
+ + - ‘选择产品’,添加产品,点击确定。 +
+ +
+ + - 此时,地图上出现了定位点,点击产品,可以看到绑定的所有设备。点击对应设备可以在地图上定位到每个设备的具体位置。 +
+ +
+ + - 点击产品上设置,‘配置属性’,勾选‘经度’、‘纬度’点击 确定。 +
+ +
+ + - 点击**保存** +
+ +
+ +### 发布上线 +回到Web应用页面,可以看到地图上的设备定位已经正常显示,可以进行**发布**。在发布前可以点击上图的**预览**查看运行效果。 +
+ +
+ +设备上显示出上传云端的经纬度。 +
+ +
+ + + diff --git a/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/code/board.json new file mode 100644 index 0000000000..8d35eaa9d3 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/code/board.json @@ -0,0 +1,46 @@ +{ + "name": "haas506", + "version": "2.0.0", + "io": { + "OLED": { + "type": "I2C", + "port": 1, + "addrWidth": 7, + "freq": 400000, + "mode": "master", + "devAddr": 60 + }, + "serial1":{ + "type":"UART", + "port":0, + "dataWidth":8, + "baudRate":9600, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial2":{ + "type":"UART", + "port":1, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + }, + "serial3":{ + "type":"UART", + "port":2, + "dataWidth":8, + "baudRate":115200, + "stopBits":1, + "flowControl":"disable", + "parity":"none" + } + }, + "debugLevel": "ERROR", + "repl":"enable", + "replPort":3 + + } + diff --git a/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/code/main.py new file mode 100644 index 0000000000..ab5ec805e3 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/code/main.py @@ -0,0 +1,219 @@ +# coding=utf-8 + +from driver import GPIO +from driver import UART +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + + + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + print('clound req data is {}'.format(request)) + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +#纬度 +def latitude(d,h): + if d=="": + return 0 + hemi="" if h=="N" else "-" + #度 + deg=int(d[0:2]) + #分 + min=str(float(d[2:])/60)[1:] + return hemi +str(deg)+min + + +#经度 +def longitude(d,h): + if d=="": + return 0 + hemi="" if h=="E" else "-" + #度 + deg=int(d[0:3]) + #分 + min=str(float(d[3:])/60)[1:] + + return hemi +str(deg)+min + + +def main(): + while True: + #串口读 + size=gps_module.read(readBuf) + data=readBuf + #将字节数据转化成字符串数据 + data_str=data.decode() + # 判断是否有数据 且数据中是否包含"$GNRMC" + if size!=0 and "$GNRMC" in data_str and "$GNVTG" in data_str: + print(readBuf) + print("------------0-----------------------") + #删除"\r\n"后,字符串变为列表 + data_list=data_str.split('\r\n') + print(data_list) + print("------------------1------------------") + for i in range(len(data_list)): + if "$GNRMC" in data_list[i]: + print(data_list[i]) + #删除"," + result=data_list[i].split(',') + print(result) + #$GNRMC,075622.000,A,3116.56922,N,12044.12475,E,0.00,0.00,020422,,,A,V*01 + #['$GNRMC', '075622.000', 'A', '3116.56922', 'N', '12044.12475', 'E', '0.00', '0.00', '020422', '', '', 'A', 'V*01'] + # 在GNRMC中取数据 + if len(result)==14: + lat=latitude(result[3],result[4]) + long=longitude(result[5],result[6]) + print("lat:",lat) + print("long:",long) + #数据上传 + gbs_data["Longitude"]= float(long) + gbs_data["Latitude"]= float(lat) + gbs_data_str=ujson.dumps(gbs_data) + data={ + 'params':gbs_data_str + } + device.postProps(data) + print("---------------------2-------------------") + time.sleep(1) + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + + #gbs操作 + gps_module=UART() #创建一个串口实例 + gps_module.open("serial1") #打开 + gps_module.setBaudRate(9600) #gps模块的波特率是9600 + readBuf=bytearray(512) #创建一个字节数组,用于接受串口数据 + #主函数 + gbs_data = {} + main() + diff --git a/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/link_platform/vehicle_location.zip b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/link_platform/vehicle_location.zip new file mode 100644 index 0000000000..265cada8bc Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/vehicle_location/haas506/link_platform/vehicle_location.zip differ diff --git a/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/README.md b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/README.md new file mode 100644 index 0000000000..4e77fdb2d1 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/README.md @@ -0,0 +1,221 @@ +# WS2812个性氛围灯 +# 简介 +LED灯带广泛应用于家具、汽车、广告、照明、轮船、酒吧等行业。跳动的彩色灯光也变成了城市夜晚的靓丽风景。 +本案例通过手机控制RGB灯光模式,点击相应的按钮就可以改变LED灯光模式。 +# 准备 +本案例需要的硬件 +器材|数量 +|--|--| +HaaS506开发板|1 +WS2812灯带(30灯)|1 +SIM卡|1 +杜邦线|若干 +# 硬件连接图 +连接时注意灯带信号方向,本案例使用SPI控制LED灯带。 + +
+ +
+ +# 代码流程 +1、连接阿里云平台。 + +2、上传关闭状态,编写灯光的5种不同的模式。 + +3、配置iot云端下发属性,当云端数据改变时,发送到设备端,再上传云端。 + +# 功能实现 +## 1、物联网平台开发 +第一次使用物联网平台的读者,需要开通实例后使用物联网平台功能。也可以使用免费的公共实例进行开发,在[阿里云物联网平台](https://iot.console.aliyun.com/lk/summary/new)中,左上角选择‘华东2-上海’,点击‘公共实例’,即可开通。 + +1、平台产品创建 + +① 登录[物联网平台控制台](https://iot.console.aliyun.com/lk/summary/new) +
+ +
+ +② 在实例概览页面,找到对应的实例,单击实例进入实例详情页面。 + +**注意 在中国地域,目前仅华东2(上海)地域开通了公共实例服务。** + +在左侧导航栏,选择设备管理 > 产品,单击创建产品。 +
+ +
+ + 输入产品信息 +
+ +
+ +③ 添加设备 +
+ +
+ +**注意:设备名称需要输入IMEI号,代码需要使用设备名称IMEI进行动态注册** +
+ +
+ + 点击确定 +
+ +
+ + ④ 打开动态注册,要连接云平台必须打开。在这个界面也可以查看需要复制的产品信息。 +
+ +
+ +2、创建产品属性(添加物模型)物模型可以导入或手动添加,[导入物模型文件](./link_platform/ws2812_strip.zip),以下为手动添加的操作流程。 + - 选择产品**功能定义**--**编辑草稿** +
+ +
+ + - **添加自定义功能** + - 添加**标识符**与**数据类型**(标识符要与代码一致) + - 点击**发布上线** +
+ +
+ + - 点击确定 +
+ +
+ +## 2、设备端开发 + +- 第一次使用开发板的读者可以按照[HaaS506 快速开始](https://haas.iot.aliyun.com/haasapi/index.html?spm=a2cpu.b92276856.0.0.17a360b1tEuLlx#/Python/docs/zh-CN/startup/HaaS506_startup)搭建开发环境。 + - 搭建完后复制[创意灯带代码](./code/)到Visual Studio Code,复制产品证书到代码相应位置。 + +
+ +
+ +修改位置 +```python +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + +``` + + +### 调试 + +1、串口调试工具log,**网络连接成功**--**动态注册成功** +
+ +
+2、云端有数据传入,打开实时刷新,显示数据会自动更新。 +
+ +
+ +## 3、物联网应用开发 +以下是物联网应用开发流程,接下来按以下流程介绍移动端应用的开发。 + +### 3.1新建‘普通项目’ + - 使用阿里云[IoTStudio](https://studio.iot.aliyun.com/?spm=a2cpu.b17028610.0.0.17a360b1Rb7xdd)创建项目。 + - 在项目管理新建空白项目 +
+ +
+ +
+ +
+ +### 3.2关联产品和设备 +
+ +
+ +
+ +
+ +### 3.3新建‘移动应用’ +
+ +
+ +
+ +
+ +点击上图红框中的‘组件’,就可以看到可用的组件列表。各组件的使用说明请参考[组件说明](https://help.aliyun.com/document_detail/181886.html) +### 3.4页面设计 +将组件拖到中间画布区 +
+ +
+ +**开关组件设置** +
+ +
+ + - 配置交互 +
+ +
+ +
+ +
+ +依次设置其他开关组件 +**彩色跑马灯** +
+ +
+ +
+ +
+ +**蓝色跑马灯** +
+ +
+ +**反向彩色跑马灯** +
+ +
+ +**霓虹灯** +
+ +
+ +**常亮蓝色** +
+ +
+ +### 3.5预览和发布上线 +在页面‘’保存‘’并点击‘预览’进行预览。 +
+ +
+ +手机扫描二维码,可以在手机看查看数据。 + +
+ +
+ diff --git a/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/board.json b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/board.json new file mode 100644 index 0000000000..4e503d2343 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/board.json @@ -0,0 +1,52 @@ +{ + "name": "haas506", + "version": "1.0.0", + "io": { + "led_strip": { + "type": "SPI", + "port": 0, + "mode": "master", + "freq": 3200000 + + }, + "cs": { + "type": "GPIO", + "port": 15, + "dir": "output", + "pull": "pullup" + }, + "serial1": { + "type": "UART", + "port": 0, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial2": { + "type": "UART", + "port": 1, + "dataWidth": 8, + "baudRate": 9600, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + }, + "serial3": { + "type": "UART", + "port": 2, + "dataWidth": 8, + "baudRate": 115200, + "stopBits": 1, + "flowControl": "disable", + "parity": "none", + "timeout": 1000 + } + }, + "debugLevel": "ERROR", + "repl": "enable", + "replPort":0 + } \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/main.py b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/main.py new file mode 100644 index 0000000000..6349272cfe --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/main.py @@ -0,0 +1,197 @@ +# coding=utf-8 +from driver import GPIO +from ws2812 import WS2812 +from driver import SPI +import network +import ujson +import utime as time +import modem +from aliyunIoT import Device +import kv + + + +#当iot设备连接到物联网平台的时候触发'connect' 事件 +def on_connect(data): + global module_name,default_ver,productKey,deviceName,deviceSecret,on_trigger,on_download,on_verify,on_upgrade + print('***** connect lp succeed****') + data_handle = {} + data_handle['device_handle'] = device.getDeviceHandle() + + +#当连接断开时,触发'disconnect'事件 +def on_disconnect(): + print('linkkit is disconnected') + +#当iot云端下发属性设置时,触发'props'事件 +def on_props(request): + global mode + params=request['params'] + params=eval(params) + if "mode" in params: + mode=params["mode"] + upload_mode() + + +#当iot云端调用设备service时,触发'service'事件 +def on_service(id,request): + print('clound req id is {} , req is {}'.format(id,request)) +#当设备跟iot平台通信过程中遇到错误时,触发'error'事件 +def on_error(err): + print('err msg is {} '.format(err)) + +#网络连接的回调函数 +def on_4g_cb(args): + global g_connect_status + pdp = args[0] + netwk_sta = args[1] + if netwk_sta == 1: + g_connect_status = True + else: + g_connect_status = False + +#网络连接 +def connect_network(): + global net,on_4g_cb,g_connect_status + #NetWorkClient该类是一个单例类,实现网络管理相关的功能,包括初始化,联网,状态信息等. + net = network.NetWorkClient() + g_register_network = False + if net._stagecode is not None and net._stagecode == 3 and net._subcode == 1: + g_register_network = True + else: + g_register_network = False + if g_register_network: + #注册网络连接的回调函数on(self,id,func); 1代表连接,func 回调函数 ;return 0 成功 + net.on(1,on_4g_cb) + net.connect(None) + else: + print('网络注册失败') + while True: + if g_connect_status: + print('网络连接成功') + break + time.sleep_ms(20) + +#动态注册回调函数 +def on_dynreg_cb(data): + global deviceSecret,device_dyn_resigter_succed + deviceSecret = data + device_dyn_resigter_succed = True + + + # 连接物联网平台 +def dyn_register_device(productKey,productSecret,deviceName): + global on_dynreg_cb,device,deviceSecret,device_dyn_resigter_succed + key = '_amp_customer_devicesecret' + deviceSecretdict = kv.get(key) + print("deviceSecretdict:",deviceSecretdict) + if isinstance(deviceSecretdict,str): + deviceSecret = deviceSecretdict + + if deviceSecretdict is None or deviceSecret is None: + key_info = { + 'productKey': productKey , + 'productSecret': productSecret , + 'deviceName': deviceName + } + # 动态注册一个设备,获取设备的deviceSecret + #下面的if防止多次注册,当前若是注册过一次了,重启设备再次注册就会卡住, + if not device_dyn_resigter_succed: + device.register(key_info,on_dynreg_cb) + + +mode_data = {} +def upload_mode(): + global mode_data,mode + print(mode,'------------------------------') + mode_data["mode"]= mode + + mode_data_str=ujson.dumps(mode_data) + data={ + 'params':mode_data_str + } + device.postProps(data) + + + + +if __name__ == '__main__': + ICCID=None + g_connect_status = False + net = None + device = None + deviceSecret = None + deviceName = None + #复制产品证书内容替换 + productKey = "your-productKey" + productSecret = "your-productSecret" + device_dyn_resigter_succed = False + + # 连接网络 + connect_network() + # 获取设备的IMEI 作为deviceName 进行动态注册 + deviceName = modem.info.getDevImei() + #获取设备的ICCID + ICCID=modem.sim.getIccid() + #初始化物联网平台Device类,获取device实例 + device = Device() + if deviceName is not None and len(deviceName) > 0 : + #动态注册一个设备 + dyn_register_device(productKey,productSecret,deviceName) + else: + print("获取设备IMEI失败,无法进行动态注册") + while deviceSecret is None: + time.sleep(0.2) + print('动态注册成功:' + deviceSecret) + + key_info = { + 'region' : 'cn-shanghai' , + 'productKey': productKey , + 'deviceName': deviceName , + 'deviceSecret': deviceSecret , + 'keepaliveSec': 60, + } + #打印设备信息 + print(key_info) + + #device.ON_CONNECT 是事件,on_connect是事件处理函数/回调函数 + device.on(device.ON_CONNECT,on_connect) + device.on(device.ON_DISCONNECT,on_disconnect) + device.on(device.ON_PROPS,on_props) + device.on(device.ON_SERVICE,on_service) + device.on(device.ON_ERROR,on_error) + device.connect(key_info) + #以上是阿里云联网动态注册部分 + + + spi=SPI() + spi.open("led_strip") + strip = WS2812(spi,led_count=30,intensity=1) + mode = 0 + ''' + red: 255 0 0 + green: 0 255 0 + blue: 0 0 255 + ''' + print("LED reading-------- ") + strip.turn_off() + time.sleep(2) + upload_mode() + while True: + time.sleep_ms(50) + print('---------------------------------------------------') + if mode == 1: #反向彩色跑马灯 + strip.show(1) + strip.turn_off() + elif mode == 2: #蓝色跑马灯 + strip.show(2) + elif mode == 3: #彩色跑马灯 + strip.show(3) + strip.turn_off() + elif mode == 4: #霓虹灯 + strip.show(4) + elif mode == 5: #常亮 + strip.show(5) + else: + print("turn off") + strip.turn_off() diff --git a/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/ws2812.py b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/ws2812.py new file mode 100644 index 0000000000..75e3072613 --- /dev/null +++ b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/code/ws2812.py @@ -0,0 +1,199 @@ +import utime as time + +class WS2812: + """ + Driver for WS2812 RGB LEDs. May be used for controlling single LED or chain + of LEDs. + Example of use: + chain = WS2812(spi_bus=1, led_count=4) + data = [ + (255, 0, 0), # red + (0, 255, 0), # green + (0, 0, 255), # blue + (85, 85, 85), # white + ] + chain.show(data) + Version: 1.0 + """ + + def __init__(self, spiObj, led_count=1, intensity=1): + """ + Params: + * spiObj + * led_count: count of LEDs + * intensity:light intensity (float up to 1) + """ + self.led_count = led_count + self.intensity = intensity + self.buf_bytes = (0x88, 0x8e, 0xe8, 0xee) + + # prepare SPI data buffer (4 bytes for each color) + self.buf_length = self.led_count * 3 * 4 + self.buf = bytearray(self.buf_length) + # SPI init + self.spiObj=spiObj + # turn LEDs off + # self.show([]) + + + def send_buf(self,data): + """ + Send buffer over SPI. + """ + self.spiObj.write(data) + + + def update_buf(self, data, start=0): + """ + Fill a part of the buffer with RGB data. + Order of colors in buffer is changed from RGB to GRB because WS2812 LED + has GRB order of colors. Each color is represented by 4 bytes in buffer + (1 byte for each 2 bits). + Returns the index of the first unfilled LED + Note: If you find this function ugly, it's because speed optimisations + beated purity of code. + """ + mask = 0x03 + index = start * 12 + for red, green, blue in data: + red = int(red * self.intensity) + green = int(green * self.intensity) + blue = int(blue * self.intensity) + + self.buf[index] = self.buf_bytes[green >> 6 & mask] + self.buf[index+1] = self.buf_bytes[green >> 4 & mask] + self.buf[index+2] = self.buf_bytes[green >> 2 & mask] + self.buf[index+3] = self.buf_bytes[green & mask] + + self.buf[index+4] = self.buf_bytes[red >> 6 & mask] + self.buf[index+5] = self.buf_bytes[red >> 4 & mask] + self.buf[index+6] = self.buf_bytes[red >> 2 & mask] + self.buf[index+7] = self.buf_bytes[red & mask] + + self.buf[index+8] = self.buf_bytes[blue >> 6 & mask] + self.buf[index+9] = self.buf_bytes[blue >> 4 & mask] + self.buf[index+10] = self.buf_bytes[blue >> 2 & mask] + self.buf[index+11] = self.buf_bytes[blue & mask] + + index += 12 + + return index // 12 + + def fill_buf(self, data): + """ + Fill buffer with RGB data. + All LEDs after the data are turned off. + """ + end = self.update_buf(data) + + # # turn off the rest of the LEDs + off = self.buf_bytes[0] + for index in range(end * 12, self.buf_length): + self.buf[index] = off + index += 1 + + + # 从头开始,到尾部点亮所有灯,时间可设置 + def animation_1(self): + global wite_time + num=len(self.buf)//12 + # print(self.buf) + # print(len(self.buf)) + for i in range(num): + data=self.buf[:12*(i+1)] + self.send_buf(data) + time.sleep_ms(wite_time) + #从头到尾 + def animation_2(self): + num=len(self.buf)//12 + data=self.buf[:] + for i in range(30): + # 右移12 + data=data[(num*12-12):]+data[0:(num*12-12)] + self.send_buf(data) + time.sleep_ms(100) + + # 从尾部开始,到头部点亮所有灯, + def animation_3(self): + num=len(self.buf)//12 + data1=self.buf[:] + data2=self.buf[:] + data3=[] + # print(self.buf) + # print(len(self.buf)) + for i in range(num): + for j in range((num-i-1)*12): + data1[j]=self.buf_bytes[0] + data3=data1[:12*(num-i-1)]+data2[12*(num-1-i):] + self.send_buf(data3) + time.sleep_ms(1000) + + # 从尾到头 循环,循环时间可调 + def animation_4(self): + data=self.buf[:] + for i in range(30): + # 左移12 + data=data[12:]+data[0:12] + self.send_buf(data) + time.sleep_ms(200) + + + # 关闭所有led灯 + def turn_off(self): + self.fill_buf([]) + data=self.buf[:] + # print(data) + self.send_buf(data) + + + + def show(self, mode): + global wite_time + """ + Show RGB data on LEDs. Expected data = [(R, G, B), ...] where R, G and B + are intensities of colors in range from 0 to 255. One RGB tuple for each + LED. Count of tuples may be less than count of connected LEDs. + """ + if mode==1 or mode == 3 or mode ==4: + data=[(255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255), + (255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255), + (255,0,0),(0,255,0),(0,0,255),(255,0,0),(0,255,0),(0,0,255)] + + self.fill_buf(data) + if mode == 1: + wite_time = 100 + self.animation_1() + if mode==3: + self.animation_3() + if mode==4: + self.animation_4() + if mode==2: + print("blue")#跑马灯 + data =[(0,0,255)] + self.fill_buf(data) + self.animation_2() + if mode==5: + data =[(0,0,255) for i in range(30)]#常亮 + self.fill_buf(data) + wite_time = 0 + self.animation_1() + + + + + +# from utime import time + +# def rander(seed,n): +# if n ==1: +# return 0 +# seed = int(seed) +# length = len(str(seed)) +# seed = int(seed**2/pow(10,(length/2))) % int(pow(10.0,length)) +# print(str(seed) +" " ,end='') +# rander(seed,n-1) +# def main(): +# seed = time() +# rander(seed,100) + +# main() \ No newline at end of file diff --git a/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/link_platform/ws2812_strip.zip b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/link_platform/ws2812_strip.zip new file mode 100644 index 0000000000..c36b37014c Binary files /dev/null and b/haas_lib_bundles/python/docs/examples/ws2812_strip/haas506/link_platform/ws2812_strip.zip differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps1.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps1.png" new file mode 100644 index 0000000000..210b7613df Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps10.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps10.png" new file mode 100644 index 0000000000..d746c0399d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps11.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps11.png" new file mode 100644 index 0000000000..5f874b7b96 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps12.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps12.png" new file mode 100644 index 0000000000..badca20555 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps13.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps13.png" new file mode 100644 index 0000000000..9360b44e81 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps14.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps14.png" new file mode 100644 index 0000000000..fcb33e948d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps15.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps15.png" new file mode 100644 index 0000000000..75fa7cdcac Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps16.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps16.png" new file mode 100644 index 0000000000..8c6716aa32 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps17.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps17.png" new file mode 100644 index 0000000000..5e28c8bb80 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps18.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps18.png" new file mode 100644 index 0000000000..07fe043999 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps19.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps19.png" new file mode 100644 index 0000000000..02315ceaaf Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps2.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps2.png" new file mode 100644 index 0000000000..df75e25c8e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps20.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps20.png" new file mode 100644 index 0000000000..a7c1439c07 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps21.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps21.png" new file mode 100644 index 0000000000..f598b75dc5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps22.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps22.png" new file mode 100644 index 0000000000..ad3ac7c9c6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps23.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps23.png" new file mode 100644 index 0000000000..178cdae298 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps24.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps24.png" new file mode 100644 index 0000000000..8e0d36612f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps3.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps3.png" new file mode 100644 index 0000000000..1c4cdf39e3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps4.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps4.png" new file mode 100644 index 0000000000..0560bdf41f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps5.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps5.png" new file mode 100644 index 0000000000..c6d68781cd Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps6.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps6.png" new file mode 100644 index 0000000000..04b4bebea4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps7.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps7.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps8.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps8.png" new file mode 100644 index 0000000000..4069308ce6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps9.png" "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps9.png" new file mode 100644 index 0000000000..dd6829fc3c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506gps\345\256\232\344\275\215\347\263\273\347\273\237/gps9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip1.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip1.png" new file mode 100644 index 0000000000..a944b2b37d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip10.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip10.png" new file mode 100644 index 0000000000..46873b68fb Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip11.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip11.png" new file mode 100644 index 0000000000..ff0d416cae Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip12.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip12.png" new file mode 100644 index 0000000000..f4f06ef0d4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip13.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip13.png" new file mode 100644 index 0000000000..83abda0e5e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip14.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip14.png" new file mode 100644 index 0000000000..5cfa21dafe Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip15.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip15.png" new file mode 100644 index 0000000000..8902358f7f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip16.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip16.png" new file mode 100644 index 0000000000..401acf2cd6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip17.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip17.png" new file mode 100644 index 0000000000..bfe267f695 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip18.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip18.png" new file mode 100644 index 0000000000..57fab34ca8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip19.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip19.png" new file mode 100644 index 0000000000..28d17e1a0f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip2.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip2.png" new file mode 100644 index 0000000000..2db84b966b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip20.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip20.png" new file mode 100644 index 0000000000..e1a61de3c5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip21.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip21.png" new file mode 100644 index 0000000000..a7f181afac Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip22.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip22.png" new file mode 100644 index 0000000000..16c2abf260 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip23.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip23.png" new file mode 100644 index 0000000000..d4e02e4093 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip24.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip24.png" new file mode 100644 index 0000000000..5cd48f082f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip25.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip25.png" new file mode 100644 index 0000000000..26743aaa8a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip26.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip26.png" new file mode 100644 index 0000000000..b9b0232694 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip27.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip27.png" new file mode 100644 index 0000000000..5dc9bb51e5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip28.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip28.png" new file mode 100644 index 0000000000..62a60fb6c7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip28.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip3.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip3.png" new file mode 100644 index 0000000000..e09f1e2554 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip4.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip4.png" new file mode 100644 index 0000000000..ca934126c4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip5.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip5.png" new file mode 100644 index 0000000000..c784965873 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip6.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip6.png" new file mode 100644 index 0000000000..5ddb4897b8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip7.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip7.png" new file mode 100644 index 0000000000..c7253cdd59 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip8.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip8.png" new file mode 100644 index 0000000000..0579ac974c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip9.png" "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip9.png" new file mode 100644 index 0000000000..14289629ca Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\344\271\205\345\235\220\346\217\220\351\206\222\347\263\273\347\273\237/tip9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/1.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/1.png" new file mode 100644 index 0000000000..eb32e23fd9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/2.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/2.png" new file mode 100644 index 0000000000..c42d3d952f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/3.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/3.png" new file mode 100644 index 0000000000..e291d1ea55 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/4.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/4.png" new file mode 100644 index 0000000000..229ec43e76 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/5.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/5.png" new file mode 100644 index 0000000000..17d405429a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/6.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/6.png" new file mode 100644 index 0000000000..ef5d4b0399 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/7.png" "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/7.png" new file mode 100644 index 0000000000..8a6cc9ffad Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\205\254\345\205\261\345\256\236\344\276\213\345\210\233\345\273\272/7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy1.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy1.png" new file mode 100644 index 0000000000..b62c1b1dbe Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy10.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy10.png" new file mode 100644 index 0000000000..2644ef0305 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy11.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy11.png" new file mode 100644 index 0000000000..0139a8124c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy12.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy12.png" new file mode 100644 index 0000000000..253b454740 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy13.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy13.png" new file mode 100644 index 0000000000..7d133175d4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy14.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy14.png" new file mode 100644 index 0000000000..e6a3e5019e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy15.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy15.png" new file mode 100644 index 0000000000..74ff1f5e2a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy16.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy16.png" new file mode 100644 index 0000000000..75a65bcd2d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy17.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy17.png" new file mode 100644 index 0000000000..2fbeaaa510 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy18.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy18.png" new file mode 100644 index 0000000000..76ba9e744f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy19.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy19.png" new file mode 100644 index 0000000000..da40b7a582 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy2.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy2.png" new file mode 100644 index 0000000000..e89370f353 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy20.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy20.png" new file mode 100644 index 0000000000..11721a108a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy21.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy21.png" new file mode 100644 index 0000000000..fb35f07cdb Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy22.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy22.png" new file mode 100644 index 0000000000..95f09e19b0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy23.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy23.png" new file mode 100644 index 0000000000..4e8f7361b0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy24.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy24.png" new file mode 100644 index 0000000000..6276ff78fd Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy3.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy3.png" new file mode 100644 index 0000000000..9f88e55b98 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy4.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy4.png" new file mode 100644 index 0000000000..bba9b028d5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy5.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy5.png" new file mode 100644 index 0000000000..152e3b4376 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy6.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy6.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy7.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy7.png" new file mode 100644 index 0000000000..b9a36e6447 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy8.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy8.png" new file mode 100644 index 0000000000..4d85931349 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy9.png" "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy9.png" new file mode 100644 index 0000000000..998a876f2e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\231\252\351\237\263\346\243\200\346\265\213\347\263\273\347\273\237/zy9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou1.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou1.png" new file mode 100644 index 0000000000..571e454224 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou10.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou10.png" new file mode 100644 index 0000000000..e4a1de8727 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou11.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou11.png" new file mode 100644 index 0000000000..255f4391d5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou2.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou2.png" new file mode 100644 index 0000000000..be7e089d72 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou3.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou3.png" new file mode 100644 index 0000000000..df75e25c8e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou4.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou4.png" new file mode 100644 index 0000000000..ff36c61bdf Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou5.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou5.png" new file mode 100644 index 0000000000..36115eadf2 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou6.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou6.png" new file mode 100644 index 0000000000..215160ee55 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou7.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou7.png" new file mode 100644 index 0000000000..79d3beab8c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou8.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou8.png" new file mode 100644 index 0000000000..822ed8c87d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou9.png" "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou9.png" new file mode 100644 index 0000000000..c1db433244 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\243\260\346\216\247\347\201\257/sou9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in1.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in1.png" new file mode 100644 index 0000000000..e783f6a07f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in10.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in10.png" new file mode 100644 index 0000000000..0dcf381aff Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in11.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in11.png" new file mode 100644 index 0000000000..f17262a847 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in12.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in12.png" new file mode 100644 index 0000000000..28c9c1c693 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in13.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in13.png" new file mode 100644 index 0000000000..43a70059fc Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in14.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in14.png" new file mode 100644 index 0000000000..3cb7bcd5f3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in15.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in15.png" new file mode 100644 index 0000000000..299cda5f1b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in16.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in16.png" new file mode 100644 index 0000000000..ce72322174 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in17.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in17.png" new file mode 100644 index 0000000000..1095a9bd9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in18.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in18.png" new file mode 100644 index 0000000000..05c49c5d10 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in19.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in19.png" new file mode 100644 index 0000000000..85df9d0be9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in2.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in2.png" new file mode 100644 index 0000000000..31798220b4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in20.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in20.png" new file mode 100644 index 0000000000..11c694cc82 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in21.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in21.png" new file mode 100644 index 0000000000..a6ffebe2f6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in22.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in22.png" new file mode 100644 index 0000000000..5dd69de356 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in23.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in23.png" new file mode 100644 index 0000000000..96dbf9f011 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in24.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in24.png" new file mode 100644 index 0000000000..8ff8879de2 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in25.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in25.png" new file mode 100644 index 0000000000..7d3b97e733 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in26.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in26.png" new file mode 100644 index 0000000000..c4c4350617 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in27.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in27.png" new file mode 100644 index 0000000000..0968932eb3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in28.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in28.png" new file mode 100644 index 0000000000..a6f197bbb7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in28.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in29.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in29.png" new file mode 100644 index 0000000000..216302e18b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in29.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in3.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in3.png" new file mode 100644 index 0000000000..db8ece8e39 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in30.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in30.png" new file mode 100644 index 0000000000..abdff321e3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in30.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in31.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in31.png" new file mode 100644 index 0000000000..01280d6c8d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in31.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in32.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in32.png" new file mode 100644 index 0000000000..59984dcc29 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in32.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in33.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in33.png" new file mode 100644 index 0000000000..aacb7f7b75 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in33.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in4.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in4.png" new file mode 100644 index 0000000000..5866a9c0cc Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in5.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in5.png" new file mode 100644 index 0000000000..12877c9306 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in6.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in6.png" new file mode 100644 index 0000000000..4cd1369704 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in7.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in7.png" new file mode 100644 index 0000000000..5bd3e89cd9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in8.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in8.png" new file mode 100644 index 0000000000..618aac59b9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in9.png" "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in9.png" new file mode 100644 index 0000000000..141de53a69 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\256\266\345\272\255\345\205\245\344\276\265\346\212\245\350\255\246\347\263\273\347\273\237/in9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq1.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq1.png" new file mode 100644 index 0000000000..7f6bbcb63f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq10.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq10.png" new file mode 100644 index 0000000000..06fa0ea101 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq11.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq11.png" new file mode 100644 index 0000000000..4922ce2058 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq12.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq12.png" new file mode 100644 index 0000000000..47ce8ede72 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq13.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq13.png" new file mode 100644 index 0000000000..b6be0d518f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq14.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq14.png" new file mode 100644 index 0000000000..046b271093 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq15.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq15.png" new file mode 100644 index 0000000000..7dd78c6d8c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq16.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq16.png" new file mode 100644 index 0000000000..31ff553675 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq17.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq17.png" new file mode 100644 index 0000000000..22dbcd9ba7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq18.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq18.png" new file mode 100644 index 0000000000..71bf5b8f70 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq19.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq19.png" new file mode 100644 index 0000000000..e9a237ca05 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq2.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq2.png" new file mode 100644 index 0000000000..2098b2bd36 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq20.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq20.png" new file mode 100644 index 0000000000..2b574fc1a5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq21.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq21.png" new file mode 100644 index 0000000000..44bf9ca251 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq22.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq22.png" new file mode 100644 index 0000000000..5314f58091 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq23.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq23.png" new file mode 100644 index 0000000000..6906d329d0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq24.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq24.png" new file mode 100644 index 0000000000..7e6d2d5a8d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq25.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq25.png" new file mode 100644 index 0000000000..af3dfda1c3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq26.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq26.png" new file mode 100644 index 0000000000..c9168cb10f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq27.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq27.png" new file mode 100644 index 0000000000..f08f423275 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq28.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq28.png" new file mode 100644 index 0000000000..3e1b76ab3d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq28.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq29.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq29.png" new file mode 100644 index 0000000000..4f8c6943a2 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq29.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq3.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq3.png" new file mode 100644 index 0000000000..866744cebb Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq30.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq30.png" new file mode 100644 index 0000000000..694c73fa44 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq30.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq31.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq31.png" new file mode 100644 index 0000000000..14447deec4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq31.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq32.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq32.png" new file mode 100644 index 0000000000..c3ae0bae9d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq32.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq33.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq33.png" new file mode 100644 index 0000000000..d03d173a4d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq33.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq34.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq34.png" new file mode 100644 index 0000000000..1772315179 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq34.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq4.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq4.png" new file mode 100644 index 0000000000..d41db20bef Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq5.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq5.png" new file mode 100644 index 0000000000..a516728388 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq6.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq6.png" new file mode 100644 index 0000000000..ba42aaca4c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq7.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq7.png" new file mode 100644 index 0000000000..a0735e6894 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq8.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq8.png" new file mode 100644 index 0000000000..70fe8af375 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq9.png" "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq9.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\345\261\205\345\256\266\351\232\224\347\246\273\347\233\221\346\216\247\347\263\273\347\273\237/yq9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID1.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID1.png" new file mode 100644 index 0000000000..c48bd6eb88 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID10.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID10.png" new file mode 100644 index 0000000000..19550d1bc7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID11.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID11.png" new file mode 100644 index 0000000000..a760ec9746 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID12.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID12.png" new file mode 100644 index 0000000000..97ecf2839b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID2.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID2.png" new file mode 100644 index 0000000000..a89c2e80ba Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID3.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID3.png" new file mode 100644 index 0000000000..b59d14a26e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID4.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID4.png" new file mode 100644 index 0000000000..e9bc2c333b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID5.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID5.png" new file mode 100644 index 0000000000..77bbd9a0e8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID6.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID6.png" new file mode 100644 index 0000000000..0823ee4a97 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID7.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID7.png" new file mode 100644 index 0000000000..0efe508a17 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID8.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID8.png" new file mode 100644 index 0000000000..1b4269cad8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID9.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID9.png" new file mode 100644 index 0000000000..dc24ffc757 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\345\210\267\345\215\241\351\227\250\347\246\201\347\263\273\347\273\237/RFID9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig1.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig1.png" new file mode 100644 index 0000000000..0a1532d417 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig10.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig10.png" new file mode 100644 index 0000000000..daac03394b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig11.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig11.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig12.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig12.png" new file mode 100644 index 0000000000..2fba458a0b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig13.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig13.png" new file mode 100644 index 0000000000..e2f2fd84c9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig14.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig14.png" new file mode 100644 index 0000000000..ed52391a47 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig15.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig15.png" new file mode 100644 index 0000000000..9bd3c63bd8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig16.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig16.png" new file mode 100644 index 0000000000..599a6e2b1f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig2.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig2.png" new file mode 100644 index 0000000000..c25945a1fa Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig3.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig3.png" new file mode 100644 index 0000000000..a069b182ea Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig4.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig4.png" new file mode 100644 index 0000000000..396a4383fb Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig5.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig5.png" new file mode 100644 index 0000000000..919b41c529 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig6.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig6.png" new file mode 100644 index 0000000000..3f41b77da2 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig7.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig7.png" new file mode 100644 index 0000000000..1920d1e057 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig8.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig8.png" new file mode 100644 index 0000000000..f4dbf4fd50 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig9.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig9.png" new file mode 100644 index 0000000000..bbdcae3ae9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\350\267\257\347\201\257/lig9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/1.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/1.png" new file mode 100644 index 0000000000..39f7a014eb Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan1.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan1.png" new file mode 100644 index 0000000000..1d57eb97d8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan10.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan10.png" new file mode 100644 index 0000000000..a6e6bd7209 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan11.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan11.png" new file mode 100644 index 0000000000..bc8f584d0c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan12.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan12.png" new file mode 100644 index 0000000000..7ff47dda11 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan13.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan13.png" new file mode 100644 index 0000000000..83576cbf27 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan14.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan14.png" new file mode 100644 index 0000000000..b44e71ed70 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan15.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan15.png" new file mode 100644 index 0000000000..4494aad158 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan16.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan16.png" new file mode 100644 index 0000000000..31bf55d1f2 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan17.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan17.png" new file mode 100644 index 0000000000..7fe9eaa8a1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan18.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan18.png" new file mode 100644 index 0000000000..a69fa76628 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan19.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan19.png" new file mode 100644 index 0000000000..07084acd02 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan2.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan2.png" new file mode 100644 index 0000000000..8e6a3c78e8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan20.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan20.png" new file mode 100644 index 0000000000..76455008cd Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan21.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan21.png" new file mode 100644 index 0000000000..71c331fd2d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan22.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan22.png" new file mode 100644 index 0000000000..70549486fd Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan23.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan23.png" new file mode 100644 index 0000000000..ecd5d6a686 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan24.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan24.png" new file mode 100644 index 0000000000..c2614077c7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan25.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan25.png" new file mode 100644 index 0000000000..aa3f8c591c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan26.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan26.png" new file mode 100644 index 0000000000..01b70b643a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan27.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan27.png" new file mode 100644 index 0000000000..15cf69c7c1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan28.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan28.png" new file mode 100644 index 0000000000..e0b83a6a88 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan28.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan29.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan29.png" new file mode 100644 index 0000000000..1bdc7710d3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan29.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan3.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan3.png" new file mode 100644 index 0000000000..af33f84f5a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan30.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan30.png" new file mode 100644 index 0000000000..37704db157 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan30.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan31.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan31.png" new file mode 100644 index 0000000000..aa3ec36673 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan31.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan32.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan32.png" new file mode 100644 index 0000000000..29d1a50f5c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan32.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan4.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan4.png" new file mode 100644 index 0000000000..33112396c6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan5.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan5.png" new file mode 100644 index 0000000000..93c958f2e1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan6.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan6.png" new file mode 100644 index 0000000000..f04c4f6adc Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan7.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan7.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan8.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan8.png" new file mode 100644 index 0000000000..0caac153a0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan9.png" "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan9.png" new file mode 100644 index 0000000000..df5985d0ca Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\346\231\272\350\203\275\351\243\216\346\211\207/fan9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir1.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir1.png" new file mode 100644 index 0000000000..fbd601bade Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir10.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir10.png" new file mode 100644 index 0000000000..18be7f5ff5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir11.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir11.png" new file mode 100644 index 0000000000..eac3fecb03 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir12.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir12.png" new file mode 100644 index 0000000000..edb50f3fb0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir13.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir13.png" new file mode 100644 index 0000000000..568d3d41b5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir14.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir14.png" new file mode 100644 index 0000000000..65013697e1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir15.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir15.png" new file mode 100644 index 0000000000..55ae63ba14 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir16.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir16.png" new file mode 100644 index 0000000000..6358f353cc Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir17.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir17.png" new file mode 100644 index 0000000000..2eede783c6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir18.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir18.png" new file mode 100644 index 0000000000..c6f8887e46 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir19.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir19.png" new file mode 100644 index 0000000000..bc4e937889 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir2.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir2.png" new file mode 100644 index 0000000000..46148528a4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir20.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir20.png" new file mode 100644 index 0000000000..2ea23f553e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir21.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir21.png" new file mode 100644 index 0000000000..5cdff144fe Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir22.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir22.png" new file mode 100644 index 0000000000..d7ea003da5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir23.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir23.png" new file mode 100644 index 0000000000..07e4ce41b6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir24.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir24.png" new file mode 100644 index 0000000000..360d3e249a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir25.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir25.png" new file mode 100644 index 0000000000..6986b014be Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir26.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir26.png" new file mode 100644 index 0000000000..bd91286bdd Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir27.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir27.png" new file mode 100644 index 0000000000..a928b71677 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir28.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir28.png" new file mode 100644 index 0000000000..3c189eede4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir28.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir29.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir29.png" new file mode 100644 index 0000000000..dc9943ec16 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir29.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir3.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir3.png" new file mode 100644 index 0000000000..5ac5dae4ba Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir30.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir30.png" new file mode 100644 index 0000000000..1e39bd4838 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir30.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir31.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir31.png" new file mode 100644 index 0000000000..5a455d04d8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir31.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir32.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir32.png" new file mode 100644 index 0000000000..7f417c1062 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir32.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir33.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir33.png" new file mode 100644 index 0000000000..21a933c38b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir33.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir34.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir34.png" new file mode 100644 index 0000000000..a6e2d7fe1a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir34.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir35.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir35.png" new file mode 100644 index 0000000000..6a030453a1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir35.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir36.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir36.png" new file mode 100644 index 0000000000..1038b86572 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir36.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir37.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir37.png" new file mode 100644 index 0000000000..31ee656729 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir37.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir38.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir38.png" new file mode 100644 index 0000000000..a8872c2778 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir38.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir39.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir39.png" new file mode 100644 index 0000000000..0ba945b449 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir39.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir4.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir4.png" new file mode 100644 index 0000000000..71b0ff63c5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir40.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir40.png" new file mode 100644 index 0000000000..1d7b0bda7f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir40.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir41.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir41.png" new file mode 100644 index 0000000000..f4385b6489 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir41.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir5.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir5.png" new file mode 100644 index 0000000000..cb469d0d99 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir6.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir6.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir7.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir7.png" new file mode 100644 index 0000000000..b905bd837c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir8.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir8.png" new file mode 100644 index 0000000000..bb17696802 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir9.png" "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir9.png" new file mode 100644 index 0000000000..be2f9d269c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\253\347\204\260\344\274\240\346\204\237\345\231\250/fir9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws1.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws1.png" new file mode 100644 index 0000000000..ca69ff3d5d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws10.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws10.png" new file mode 100644 index 0000000000..9c18bcaf7b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws11.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws11.png" new file mode 100644 index 0000000000..44c6584bc3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws12.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws12.png" new file mode 100644 index 0000000000..fcd4ea417b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws13.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws13.png" new file mode 100644 index 0000000000..dcaa52f2e4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws14.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws14.png" new file mode 100644 index 0000000000..75564dd760 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws15.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws15.png" new file mode 100644 index 0000000000..8ca016ab85 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws16.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws16.png" new file mode 100644 index 0000000000..c5aedfd001 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws17.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws17.png" new file mode 100644 index 0000000000..1a8f900688 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws18.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws18.png" new file mode 100644 index 0000000000..f2c4576e34 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws19.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws19.png" new file mode 100644 index 0000000000..93240ffb49 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws2.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws2.png" new file mode 100644 index 0000000000..fa29bc0ace Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws20.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws20.png" new file mode 100644 index 0000000000..63cb90202f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws21.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws21.png" new file mode 100644 index 0000000000..3e846046b0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws22.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws22.png" new file mode 100644 index 0000000000..61f4d56484 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws23.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws23.png" new file mode 100644 index 0000000000..d2026bf1f3 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws24.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws24.png" new file mode 100644 index 0000000000..ca1e5ca988 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws25.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws25.png" new file mode 100644 index 0000000000..8255b387e4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws26.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws26.png" new file mode 100644 index 0000000000..94ac92bf85 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws27.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws27.png" new file mode 100644 index 0000000000..ebf3091743 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws3.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws3.png" new file mode 100644 index 0000000000..c3ab7613d6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws4.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws4.png" new file mode 100644 index 0000000000..2974bd59a7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws5.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws5.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws6.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws6.png" new file mode 100644 index 0000000000..bced2cf7dc Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws7.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws7.png" new file mode 100644 index 0000000000..e82e1f5f4d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws8.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws8.png" new file mode 100644 index 0000000000..409e9b45d7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws9.png" "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws9.png" new file mode 100644 index 0000000000..fc327e440f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\201\257\345\270\246/ws9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas1.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas1.png" new file mode 100644 index 0000000000..35380a8e9d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas10.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas10.png" new file mode 100644 index 0000000000..68e19e22a0 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas11.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas11.png" new file mode 100644 index 0000000000..cdf5a68db9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas12.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas12.png" new file mode 100644 index 0000000000..28c182b235 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas13.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas13.png" new file mode 100644 index 0000000000..d3c58238d7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas14.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas14.png" new file mode 100644 index 0000000000..a614c8575f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas15.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas15.png" new file mode 100644 index 0000000000..30bc17f2ee Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas16.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas16.png" new file mode 100644 index 0000000000..1095a9bd9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas17.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas17.png" new file mode 100644 index 0000000000..b4bb3ea49f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas18.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas18.png" new file mode 100644 index 0000000000..5f3be6653b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas19.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas19.png" new file mode 100644 index 0000000000..b3c7e51f6c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas2.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas2.png" new file mode 100644 index 0000000000..87a5d926b9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas20.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas20.png" new file mode 100644 index 0000000000..7580de80c7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas21.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas21.png" new file mode 100644 index 0000000000..6afd49c918 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas22.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas22.png" new file mode 100644 index 0000000000..1be54365fb Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas23.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas23.png" new file mode 100644 index 0000000000..c3a367a2e7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas24.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas24.png" new file mode 100644 index 0000000000..9c9148cbec Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas25.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas25.png" new file mode 100644 index 0000000000..cf91fdbc18 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas26.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas26.png" new file mode 100644 index 0000000000..ad19e55584 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas26.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas27.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas27.png" new file mode 100644 index 0000000000..78314acd04 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas27.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas28.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas28.png" new file mode 100644 index 0000000000..a17c7b8099 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas28.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas29.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas29.png" new file mode 100644 index 0000000000..3b61531978 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas29.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas3.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas3.png" new file mode 100644 index 0000000000..45b302ecc9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas30.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas30.png" new file mode 100644 index 0000000000..f8c9c1d7af Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas30.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas31.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas31.png" new file mode 100644 index 0000000000..2a54fa127e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas31.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas32.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas32.png" new file mode 100644 index 0000000000..adf061058e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas32.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas33.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas33.png" new file mode 100644 index 0000000000..b39faf0a8e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas33.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas34.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas34.png" new file mode 100644 index 0000000000..7eadd7d12a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas34.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas35.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas35.png" new file mode 100644 index 0000000000..ab0fb4c036 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas35.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas4.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas4.png" new file mode 100644 index 0000000000..71ba17c03d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas5.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas5.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas6.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas6.png" new file mode 100644 index 0000000000..171ee80a5c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas7.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas7.png" new file mode 100644 index 0000000000..150c66e43a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas8.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas8.png" new file mode 100644 index 0000000000..a3801f905b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas9.png" "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas9.png" new file mode 100644 index 0000000000..5b22bafe2f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\207\203\346\260\224\346\243\200\346\265\213\347\263\273\347\273\237/gas9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh1.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh1.png" new file mode 100644 index 0000000000..72234f248c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh10.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh10.png" new file mode 100644 index 0000000000..1f438bdb9c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh11.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh11.png" new file mode 100644 index 0000000000..0352573ae1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh12.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh12.png" new file mode 100644 index 0000000000..cf9b16ab59 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh13.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh13.png" new file mode 100644 index 0000000000..2a237d066d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh14.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh14.png" new file mode 100644 index 0000000000..5213a13e2c Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh15.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh15.png" new file mode 100644 index 0000000000..33602e3cfc Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh2.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh2.png" new file mode 100644 index 0000000000..bd0fc59ac9 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh3.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh3.png" new file mode 100644 index 0000000000..84a3bab9d7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh4.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh4.png" new file mode 100644 index 0000000000..8230657345 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh5.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh5.png" new file mode 100644 index 0000000000..7c658ca02f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh6.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh6.png" new file mode 100644 index 0000000000..73d3fb2200 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh7.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh7.png" new file mode 100644 index 0000000000..553d93dbf8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh8.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh8.png" new file mode 100644 index 0000000000..d677c2047d Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh9.png" "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh9.png" new file mode 100644 index 0000000000..7781c8e281 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\224\262\351\206\233\346\265\223\345\272\246\346\243\200\346\265\213/ocoh9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq10.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq10.jpg" new file mode 100644 index 0000000000..a4b6ff3630 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq10.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq2.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq2.jpg" new file mode 100644 index 0000000000..f39ed17288 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq2.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq22.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq22.jpg" new file mode 100644 index 0000000000..e84dc79b4f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq22.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq3.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq3.jpg" new file mode 100644 index 0000000000..937547d013 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq3.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq4.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq4.jpg" new file mode 100644 index 0000000000..70d95ac81b Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq4.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq5.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq5.jpg" new file mode 100644 index 0000000000..bb8cfdc345 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq5.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq6.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq6.jpg" new file mode 100644 index 0000000000..f673ae4fee Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq6.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq7.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq7.jpg" new file mode 100644 index 0000000000..07e777ce49 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq7.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq8.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq8.jpg" new file mode 100644 index 0000000000..8dc2bd03b8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq8.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq9.jpg" "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq9.jpg" new file mode 100644 index 0000000000..bbd6847a3f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\347\225\252\350\214\204\351\222\237/fq9.jpg" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd01.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd01.png" new file mode 100644 index 0000000000..9a2a4a3fec Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd01.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd02.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd02.png" new file mode 100644 index 0000000000..5641055824 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd02.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd03.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd03.png" new file mode 100644 index 0000000000..b8b41de3be Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd03.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd04.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd04.png" new file mode 100644 index 0000000000..d07fa1fa69 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd04.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd05.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd05.png" new file mode 100644 index 0000000000..5c20e61632 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd05.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd06.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd06.png" new file mode 100644 index 0000000000..cb743e25f1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd06.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd07.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd07.png" new file mode 100644 index 0000000000..7610fcc242 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd07.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd08.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd08.png" new file mode 100644 index 0000000000..07971e6954 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd08.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd09.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd09.png" new file mode 100644 index 0000000000..b887d0a8e7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd09.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd10.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd10.png" new file mode 100644 index 0000000000..dfe919fb38 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd11.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd11.png" new file mode 100644 index 0000000000..9c52b15871 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd12.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd12.png" new file mode 100644 index 0000000000..228a79542f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd13.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd13.png" new file mode 100644 index 0000000000..9f151bf1c4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd14.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd14.png" new file mode 100644 index 0000000000..41686cceee Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd15.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd15.png" new file mode 100644 index 0000000000..2d37c8a547 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd15.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd16.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd16.png" new file mode 100644 index 0000000000..14d8289b23 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd16.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd17.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd17.png" new file mode 100644 index 0000000000..d1b68d1b13 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd17.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd18.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd18.png" new file mode 100644 index 0000000000..cfa4e74bee Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd18.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd19.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd19.png" new file mode 100644 index 0000000000..75e321b23e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd19.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd20.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd20.png" new file mode 100644 index 0000000000..08d9784db7 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd20.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd21.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd21.png" new file mode 100644 index 0000000000..91574f74a1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd21.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd22.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd22.png" new file mode 100644 index 0000000000..9ac769a1f8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd22.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd23.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd23.png" new file mode 100644 index 0000000000..d4f8bf94c5 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd23.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd24.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd24.png" new file mode 100644 index 0000000000..fa62e8fb93 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd24.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd25.png" "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd25.png" new file mode 100644 index 0000000000..17d91d8223 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\207\252\345\212\250\346\204\237\345\272\224\351\227\250/zd25.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt1.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt1.png" new file mode 100644 index 0000000000..8f4d374910 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt2.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt2.png" new file mode 100644 index 0000000000..3addcf9377 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt3.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt3.png" new file mode 100644 index 0000000000..413bea56d6 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt4.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt4.png" new file mode 100644 index 0000000000..61e2be09de Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt5.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt5.png" new file mode 100644 index 0000000000..a5e37a7553 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt6.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt6.png" new file mode 100644 index 0000000000..d91263734f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt7.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt7.png" new file mode 100644 index 0000000000..4660d4a672 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt8.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt8.png" new file mode 100644 index 0000000000..a8544a3867 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt9.png" "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt9.png" new file mode 100644 index 0000000000..9923f2f69f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\350\265\267\345\244\234\347\201\257/lt9.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld1.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld1.png" new file mode 100644 index 0000000000..7f6bbcb63f Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld1.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld10.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld10.png" new file mode 100644 index 0000000000..c6852a0840 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld10.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld11.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld11.png" new file mode 100644 index 0000000000..d92fc249e4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld11.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld12.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld12.png" new file mode 100644 index 0000000000..db94c96e5a Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld12.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld13.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld13.png" new file mode 100644 index 0000000000..ca344a57a8 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld13.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld14.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld14.png" new file mode 100644 index 0000000000..5918cb0b63 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld14.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld2.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld2.png" new file mode 100644 index 0000000000..2098b2bd36 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld2.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld3.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld3.png" new file mode 100644 index 0000000000..ce321e7877 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld3.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld4.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld4.png" new file mode 100644 index 0000000000..761b57b830 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld4.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld5.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld5.png" new file mode 100644 index 0000000000..1ab917a7a1 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld5.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld6.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld6.png" new file mode 100644 index 0000000000..23023e85b4 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld6.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld7.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld7.png" new file mode 100644 index 0000000000..2a00299949 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld7.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld8.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld8.png" new file mode 100644 index 0000000000..7da356817e Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld8.png" differ diff --git "a/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld9.png" "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld9.png" new file mode 100644 index 0000000000..8683d39e03 Binary files /dev/null and "b/haas_lib_bundles/python/docs/images/506\351\233\267\350\276\276\351\201\277\351\232\234\347\263\273\347\273\237/ld9.png" differ