参考文档 http://www.co2meters.com/Documentation/Manuals/Manual-AMP-0002-T6713-Sensor.pdf
--初始化并打开I2C操作
local function read_t6703(id)
if i2c.setup(id, i2c.SLOW)~= i2c.SLOW then
log.error("I2C.init is: ","fail")
i2c.close(id)
return
end
i2c.send(id,0x15,{0x04, 0x13, 0x8B, 0x00, 0x01})
sys.wait(10)
local data = i2c.recv(id,0x15,4)
i2c.close(id)
log.info("HEX data: ", data:toHex())
end