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 i2cVeml6075
program: '
program: ' init i2c
program: ex("pi4j", "i2c use 1")
program: '
program: ' init veml6075
program: ex("pi4j", "i2c write2 0x10,0x00,0x00,0x10") ' config
program: '
program: 'get ultra violet lux
program: uvas=ex("pi4j", "i2c read2 0x10,0x07") ' uva_raw
program: uvaw=s2i(uvas)
program: uva=(0x00ff & uvaw)*256+uvaw/256
program: uvbs=ex("pi4j", "i2c read2 0x10,0x09") ' uvb_raw
program: uvbw=s2i(uvbs)
program: uvb=(0x00ff & uvbw)*256+uvbw/256
program: uvc1=ex("pi4j", "i2c read2 0x10,0x0a") ' uvcomp1
program: uvc2=ex("pi4j", "i2c read2 0x10,0x0b") ' uvcomp2
program: uvaCalc = uva - 2.22 * s2i(uvc1) - 1.33 * s2i(uvc2)
program: uvbCalc = uvb - 2.95 * s2i(uvc1) - 1.74 * s2i(uvc2)
program: '
program: '
program: ex("pi4j", "i2c close.")
program: 'ex("service","clear sendBuffer")
program: ex("service","putSendBuffer device=uva, Date="+ex("service","getCurrentDate.")+", v="+uvaCalc)
program: ex("service","putSendBuffer device=uvb, Date="+ex("service","getCurrentDate.")+",v="+uvbCalc)
program: ex("service","sendResults.")
command: end i2cVeml6075
command: run i2cVeml6075
result:
device=temp, Date=2019/2/24/ 21:10:52, v=21.95556640625
device=humid, Date=2019/2/24/ 21:10:52,v=42.633056640625
currentDevice="yamaRasPiDp1_1",Date=2019/2/24/ 21:10:52

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