当前位置:网站首页>2.17 haas506 2.0开发教程-system(仅支持2.2以上版本)
2.17 haas506 2.0开发教程-system(仅支持2.2以上版本)
2022-06-23 05:12:00 【智云服】
haas506 2.0开发教程-system
1.开发板休眠、关机、重启
案例说明
- 本案例演示使用开发板自动关机重启等功能。
main.py
import system
import utime
#休眠
system.lightsleep()
#休眠后,设备功耗会降低,程序能运行
utime.sleep(2)
#退出休眠
print('退出休眠返回值:',system.lightsleep(0))
utime.sleep(2)
#关机,关机后程序不会运行
system.poweroff()
''' #重启 system.reset() '''
输出
<E>platform_sys SleepEnable1:0
退出休眠返回值: 0
3.Class-system
| reset | poweroff | lightsleep |
|---|---|---|
| 模块重启 | 模块关机 | 普通休眠模式 |
system - 系统模块
- 模块功能:控制开发板开机重启及休眠功能。
reset - 模块重启
函数功能: 模块重启
函数原型:
system.reset()
- 参数说明: 无
poweroff() - 模块关机
函数功能: 模块关机
函数原型:
system.poweroff()
- 参数说明: 无
lightsleep - 普通休眠模式
函数功能: 普通休眠模式,休眠后功耗降低
函数原型:
system.lightsleep(value)
- 参数说明:
| 参数 | 说明 |
|---|---|
| 无参数 | 一直休眠 |
| value = 0 | 退出休眠 |
- 返回值: 返回值=0,正常,返回值=-1,失败
边栏推荐
- Sklearn classification in sklearn_ Report & accuracy / recall /f1 value
- Dora's Google SEO tutorial (1) SEO novice guide: establishment of preliminary optimization thinking
- Simple about fastdfs
- 设计师需要懂的数据指标与数据分析模型
- 华为软件测试笔试真题之变态逻辑推理题
- C language removes line breaks (or other characters) at the end of strings
- Softing dataFEED OPC Suite将西门子PLC数据存储到Oracle数据库中
- Jour 04 projet de santé mentale - gestion des rendez - vous - gestion des forfaits
- Laravel log channel 分组配置
- Machine learning 3-ridge regression, Lasso, variable selection technique
猜你喜欢
随机推荐
Global attribute lang attribute
Linked Storage
图解 Google V8 # 17:消息队列:V8是怎么实现回调函数的?
Find the number of nodes in the widest layer of a binary tree
Leetcode topic resolution single number
将TensorFlow1.x改写为pytorch
haas506 2.0开发教程-hota(仅支持2.2以上版本)
C Advanced Learning -- Reflection
把CSMA/CD、Token Bus、Token Ring说清楚
Machine learning artifact scikit learn minimalist tutorial
Functions and basic structure of CPU
什么是客户体验自动化?
Possible pits in mongodb project
【已解决】“The Unity environment took too long to respond. Make sure that :\n“
同步开关电源降低EMI布局 dv/dt di/dt
程序员的真实想法 | 每日趣闻
qt creater搭建osgearth环境(osgQT MSVC2017)
Illuminate\Support\Collection 去重 unique 列表去重
QT creator builds osgearth environment (osgqt msvc2017)
Docker实战 -- 部署Redis集群与部署微服务项目








