DpClass1
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=30000
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: v1=ex("pi4j", "i2c read1 0x29,0x8c")
program: v2=ex("pi4j", "i2c read1 0x29,0x8d")
program: ex("service","putSendBuffer v1="+v1)
program: ex("service","putSendBuvver v2="+v2)
program: ex("service","putSendBuffer date="+ex("service","getCurrentDate.")+", "+v1+","+v2);
program: ex("service","sendResults.")
program: ex("pi4j", "i2c close.")
command: end i2clight
command: run i2clight
result:
v1=0
date=2016/9/25/ 17:47:36, 0,0
v1=0
date=2016/9/25/ 17:48:6, 0,0
v1=0
date=2016/9/25/ 17:48:36, 0,0
v1=0
date=2016/9/25/ 17:49:11, 0,0
v1=0
date=2016/9/25/ 17:49:36, 0,0
v1=0
date=2016/9/25/ 17:50:8, 0,0
v1=0
date=2016/9/25/ 17:50:37, 0,0
v1=0
date=2016/9/25/ 17:51:6, 0,0
currentDevice="yamaRasPiDp1_1",Date=2016/9/25/ 17:51:6