Skip to content

模组网关应用

wuzhun.wz edited this page Jun 12, 2018 · 1 revision

功能介绍

模组当作一个网关,下挂灯和温湿度传感器两个子设备,每10秒获取一次温湿度,并上报云端,当湿度大于50%时控制开灯,小于50%时关灯,并把灯的状态上报云端

应用介绍

image.png | left | 827x427

  • 模组IO配置
{
  "GPIO": [
    {
      "id": "monochrome_light",
      "port": 22,
      "dir": 0,
      "pull": 1
    },
    {
      "id": "dht11",
      "port": 19,
      "dir": 3,
      "pull": 1
    }
  ]
}

接线示意图:

image.png | left | 715x518

云端控制

  • 查看网关子设备

image.png | left | 827x286

还可以分别查看子设备详情

内存占用情况

  • JS符号表
# meminfo 
 [4271.710]<W> main [handle_meminfo_cmd#227] : call handle_meminfo_cmd ...
 [4271.710]<W> BoneEngine [handle_meminfo_cmd#228] : memory usage= 941 max=1008
#
  • 系统内存
# dumpsys mm_info
......
------------------------- memory allocation statistic ------------------------------ 
     free     |     used     |     maxused
      117680  |      123608  |      144504

-----------------number of alloc times:-----------------
[2^06] bytes: 87655   |[2^07] bytes: 16616   |[2^08] bytes:  6556   |[2^09] bytes:  9848   |
[2^10] bytes:   514   |[2^11] bytes: 66353   |[2^12] bytes:     7   |[2^13] bytes:     6   |
[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
        4384  |        3808  |        8192

# 

Clone this wiki locally