i2c-hdc1080-1
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[FrontPage]]
objectPage http://www.yama-lab.org/fwb4pi/index.php?i2c-hdc1080-1 or http://www.yama-lab.org/fwb4pi/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 write2 0x40,0x02,0x10,0x00") ' config
program: '
program: 'get temp
program: ex("pi4j", "i2c write-b 0x40,0x00") ' temp
program: delay(15)
program: v1s=ex("pi4j", "i2c read-A-2 0x40") ' get temp
program: temp=s2i(v1s)/65536.0*165-40
program: '
program: 'get humidity
program: ex("pi4j", "i2c write-b 0x40,0x01") ' get humidity
program: delay(15)
program: v2s=ex("pi4j", "i2c read-A-2 0x40") '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=2019/6/6/ 23:17:9, v=28.83392333984375
device=humid, Date=2019/6/6/ 23:17:9,v=-41.44287109375
device=temp, Date=2019/6/6/ 23:17:38, v=28.6224365234375
device=humid, Date=2019/6/6/ 23:17:38,v=-41.80908203125
currentDevice="yamaRasPiDp1_1",Date=2019/6/6/ 23:17:38
終了行:
[[FrontPage]]
objectPage http://www.yama-lab.org/fwb4pi/index.php?i2c-hdc1080-1 or http://www.yama-lab.org/fwb4pi/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 write2 0x40,0x02,0x10,0x00") ' config
program: '
program: 'get temp
program: ex("pi4j", "i2c write-b 0x40,0x00") ' temp
program: delay(15)
program: v1s=ex("pi4j", "i2c read-A-2 0x40") ' get temp
program: temp=s2i(v1s)/65536.0*165-40
program: '
program: 'get humidity
program: ex("pi4j", "i2c write-b 0x40,0x01") ' get humidity
program: delay(15)
program: v2s=ex("pi4j", "i2c read-A-2 0x40") '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=2019/6/6/ 23:17:9, v=28.83392333984375
device=humid, Date=2019/6/6/ 23:17:9,v=-41.44287109375
device=temp, Date=2019/6/6/ 23:17:38, v=28.6224365234375
device=humid, Date=2019/6/6/ 23:17:38,v=-41.80908203125
currentDevice="yamaRasPiDp1_1",Date=2019/6/6/ 23:17:38
ページ名: