LightSensor1
objectPage http://www.yama-lab.org/fwb4pi/index.php?I2CDetect or http://www.yama-lab2.org/dp-1/index.php?I2CDetect
device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min.
command: set readInterval=15000
command: set execInterval=0
command: program i2cdetect
program: '
program: ' init i2c
program: ex("pi4j", "i2c use 1")
program: '
program: ex("service","clear sendBuffer")
program: for i=0 to 7
program: xline=""+(i*16)+":"
program: for j= 0 to 15
program: addr=i*16+j
program: v0=ex("pi4j","i2c read1 "+addr+",0x00")
program: delay(50)
program: if s2i(v0)<0 then xline=xline+" -- " else xline=xline+" "+addr+" "
program: next j
program: ex("service","putSendBuffer "+xline)
program: next i
program: ex("pi4j", "i2c close.")
program: ex("service","sendResults.")
command: end i2cdetect
command: run i2cdetect
result:
0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
16: -- -- -- -- -- -- -- -- 24 -- -- -- -- -- 30 --
32: -- -- -- -- -- -- -- -- -- 41 -- -- -- -- -- --
48: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 62 --
64: -- -- -- -- -- -- -- -- 72 -- -- -- -- -- -- --
80: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
96: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
112: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
currentDevice="yamaRasPiDp1_1",Date=2017/1/25/ 1:52:6