单色灯 - Shaofa/AliOS-Things-Certification-Manual GitHub Wiki
接收云端下发属性来控制灯的开关状态,并更新灯的状态至云端。
-
代码库
[email protected]:Gravity/gravity_lite.git
代码路径:gravity_lite/devices/monochrome_light
-
linkdevelop平台 登录账号:电子书测试账号002 项目名字:gravity_lite 产品名称:单色LED灯 URL: https://linkdevelop.aliyun.com/p/a124XKk9O6qua0XK/device/productaccess/#/productaccess/productdetail?productKey=a1Jmy99o5NS&key=definition
- 模组IO配置 单色灯的连接在GPIO 22管脚上,配置成输出模式 GPIO配置成输出模式, 默认配置成高阻
{
"GPIO": [
{
"id": "monochrome_light",
"port": 22,
"dir": 0,
"pull": 1
}
]
}
LED三级管接线示意图: 长边接3.3VDC, 串接一个200欧姆的电阻,LED的输入电流需要小于20MA (5.0 VDC + 300Ω) 短边接GPIO 22
- 控制LED灯状态
- 查看LED灯当前状态
- JS符号表
# meminfo
[ 152.680]<W> main [handle_meminfo_cmd#227] : call handle_meminfo_cmd ...
[ 152.680]<W> BoneEngine [handle_meminfo_cmd#228] : memory usage= 454 max=516
#
- 系统内存
# dumpsys mm_info
......
------------------------- memory allocation statistic ------------------------------
free | used | maxused
119848 | 121496 | 131512
-----------------number of alloc times:-----------------
[2^06] bytes: 4561 |[2^07] bytes: 711 |[2^08] bytes: 268 |[2^09] bytes: 289 |
[2^10] bytes: 52 |[2^11] bytes: 3485 |[2^12] bytes: 12 |[2^13] bytes: 5 |
[2^14] bytes: 5 |[2^15] bytes: 0 |[2^16] bytes: 0 |[2^17] bytes: 0 |
[2^18] bytes: 0 |[2^19] bytes: 0 |[2^20] bytes: 0 |[2^21] bytes: 0 |
-----------------fix pool information:-----------------
free | used | total
4864 | 3328 | 8192
#
�