当前位置:网站首页>2.17 haas506 2.0 development tutorial system (only versions above 2.2 are supported)
2.17 haas506 2.0 development tutorial system (only versions above 2.2 are supported)
2022-06-23 06:38:00 【Zhiyunfu】
haas506 2.0 Development tutorial -system
1. Development board sleep 、 To turn it off 、 restart
Case description
- This case demonstrates the use of the development board to automatically shut down and restart .
main.py
import system
import utime
# Sleep
system.lightsleep()
# After hibernation , Device power consumption will be reduced , The program can run
utime.sleep(2)
# Exit dormancy
print(' Value returned from hibernation :',system.lightsleep(0))
utime.sleep(2)
# To turn it off , The program will not run after shutdown
system.poweroff()
''' # restart system.reset() '''
Output
<E>platform_sys SleepEnable1:0
Value returned from hibernation : 0
3.Class-system
| reset | poweroff | lightsleep |
|---|---|---|
| Module restart | Module shutdown | Normal sleep mode |
system - System module
- Module function : Control the startup, restart and sleep functions of the development board .
reset - Module restart
The functionality : Module restart
The function prototype :
system.reset()
- Parameter description : nothing
poweroff() - Module shutdown
The functionality : Module shutdown
The function prototype :
system.poweroff()
- Parameter description : nothing
lightsleep - Normal sleep mode
The functionality : Normal sleep mode , Reduced power consumption after sleep
The function prototype :
system.lightsleep(value)
- Parameter description :
| Parameters | explain |
|---|---|
| No parameter | Sleep all the time |
| value = 0 | Exit dormancy |
- Return value : Return value =0, normal , Return value =-1, Failure
边栏推荐
- Link of Baidu URL parameter? Research on URL parameter encryption and decryption (code example)
- [vivado] xilinxcedstore introduction
- Day_ 07 smart communication health project FreeMarker
- Day_08 传智健康项目-移动端开发-体检预约
- Skilled use of slicing operations
- Topic35——34. 在排序数组中查找元素的第一个和最后一个位置
- How to build a data application system based on overall value for energy enterprises
- LeetCode笔记:Weekly Contest 298
- Smart port: how to realize intelligent port supervision based on the national standard gb28181 protocol easygbs?
- Leetcode topic resolution remove nth node from end of list
猜你喜欢

【接口自动化】软件测试涨薪核心技能、让薪资涨幅200%

js创建数组(元素都是对象)

常见设置模式(抽象工厂&责任链模式&观察者模式)

Functions and basic structure of CPU

从 WAN 到 SD-WAN 边缘设备的网络架构

Day_ 10 smart health project - permission control, graphic report

Docker实战 -- 部署Redis集群与部署微服务项目

C # database reports errors. Let's have a look

Day_03 传智健康项目-预约管理-检查组管理
百度URL参数之LINK?URL参数加密解密研究(代码实例)
随机推荐
Day_01 传智健康项目-项目概述和环境搭建
c#数据库报错问题大家帮我看看吧
bootstrap如何清除浮动的样式
数值计算方法 Chapter7. 计算矩阵的特征值和特征向量
Leetcode topic resolution remove nth node from end of list
常见设置模式(抽象工厂&责任链模式&观察者模式)
设计师需要懂的数据指标与数据分析模型
如何查看本机IP
ffplay实现自定义输入流播放
Machine learning artifact scikit learn minimalist tutorial
Softing dataFEED OPC Suite将西门子PLC数据存储到Oracle数据库中
Progress of layer 2 technical scheme
Docker实战 -- 部署Redis集群与部署微服务项目
快速认识 WebAssembly
聚焦智慧城市,华为携手中科星图共同开拓数字化新蓝海
QT creator builds osgearth environment (osgqt msvc2017)
Laravel log channel 分组配置
中台库存中的实仓与虚仓的业务逻辑设计
Jour 13 Projet de santé mentale - chapitre 13
Kubesphere offline deployment without network environment