[[FrontPage]]

 objectPage http://www.yama-lab.org/dp-1/index.php?HexTestEx1 or http://www.yama-lab2.org/dp-1/index.php?HexTestEx2
 device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min.
 command: set readInterval=15000
 command: set execInterval=0
 command: program i2clight
 program: ex("pi4j", "i2c use 1")
 program: ex("pi4j", "i2c write1 0x29,0x80,0x03") 'power up the tsl2561 lux sensor
 program: ex("pi4j", "i2c write1 0x29,0x81,0x00")
 program: ex("pi4j", "i2c write1 0x29,0x86,0x00") 'scale
 program: ex("pi4j", "i2c write1 0x29,0x80,0x00") 'power down
 program: ex("pi4j", "i2c write1 0x29,0x80,0x03") ' power up again
 program: delay(50)
 program: v1=ex("pi4j", "i2c read1 0x29,0x8c")
 program: v2=ex("pi4j", "i2c read1 0x29,0x8d")
 program: v=s2i(v2)*256+s2i(v1)
 program: ex("service","clear sendBuffer")
 program: ex("service","putSendBuffer device=light, date="+ex("service","getCurrentDate.")+", v="+v);
 program: ex("service","sendResults.")
 program: ex("pi4j", "i2c close.")
 command: end i2clight
 command: run i2clight
 result:
 device=light, date=2016/9/26/ 5:6:42, v=19
 currentDevice="yamaRasPiDp1_1",Date=2016/9/26/ 5:6:42

 device=light, date=2016/9/26/ 5:6:57, v=91
 currentDevice="yamaRasPiDp1_1",Date=2016/9/26/ 5:6:57


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS