FrontPage

objectPage http://www.yama-lab.org/dp-1/index.php?i2c-hdc1080-1 or http://www.yama-lab.org/dp-1/index.php?i2c-hdc1080-1
device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min.
command: set readInterval=30000
command: set execInterval=0
command: set reportLength=120
command: program i2cHdc1080
program: '
program: ' init i2c
program: ex("pi4j", "i2c use 1")
program: '
program: ' init hdc1080 
program: ex("pi4j", "i2c write1 0x40,0x02,0x00") ' config
program: 'get temp
program: delay(15)
program: v1s=ex("pi4j", "i2c read2 0x40,0x00") 'temp
program: temp=s2i(v1s)/65536.0*165-40
program: v2s=ex("pi4j", "i2c read2 0x40,0x01") 'humid
program: humid=s2i(v2s)/65536.0*100
program: '
program: ex("pi4j", "i2c close.")
program: 'ex("service","clear sendBuffer")
program: ex("service","putSendBuffer device=temp, Date="+ex("service","getCurrentDate.")+", v="+temp)
program: ex("service","putSendBuffer device=humid, Date="+ex("service","getCurrentDate.")+",v="+humid)
program: ex("service","sendResults.")
command: end i2cHdc1080
command: run i2cHdc1080
result:
device=temp, Date=2018/9/20/ 1:28:24, v=-40.00251770019531
device=humid, Date=2018/9/20/ 1:28:24,v=-0.00152587890625
device=temp, Date=2018/9/20/ 1:28:54, v=-40.00251770019531
device=humid, Date=2018/9/20/ 1:28:54,v=-0.00152587890625
device=temp, Date=2018/9/20/ 1:29:24, v=-40.00251770019531
device=humid, Date=2018/9/20/ 1:29:24,v=-0.00152587890625
device=temp, Date=2018/9/20/ 1:29:54, v=-40.00251770019531
device=humid, Date=2018/9/20/ 1:29:54,v=-0.00152587890625
device=temp, Date=2018/9/20/ 1:30:24, v=-40.00251770019531
device=humid, Date=2018/9/20/ 1:30:24,v=-0.00152587890625
device=temp, Date=2018/9/20/ 1:30:54, v=-40.00251770019531
device=humid, Date=2018/9/20/ 1:30:54,v=-0.00152587890625
currentDevice="yamaRasPiDp9_1",Date=2018/9/20/ 1:30:54

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS