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+" xx " 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: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
16: xx xx xx xx xx xx xx xx 24 xx xx xx xx xx 30 xx
32: xx xx xx xx xx xx xx xx xx 41 xx xx xx xx xx xx
48: xx xx xx xx xx xx xx xx xx xx xx xx xx xx 62 xx
64: xx xx xx xx xx xx xx xx 72 xx xx xx xx xx xx xx
80: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
96: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
112: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
currentDevice="",Date=2016/10/27/ 1:44:16