[[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=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=stoi(v2)*256+stoi(v1) 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/25/ 20:59:50, v=3 device=light, date=2016/9/25/ 20:59:59, v=3 device=light, date=2016/9/25/ 21:0:14, v=198 device=light, date=2016/9/25/ 21:0:29, v=329 device=light, date=2016/9/25/ 21:0:44, v=3 device=light, date=2016/9/25/ 21:1:1, v=3 device=light, date=2016/9/25/ 21:1:14, v=3 device=light, date=2016/9/25/ 21:1:29, v=3 device=light, date=2016/9/25/ 21:1:45, v=3 device=light, date=2016/9/25/ 21:1:59, v=3 device=light, date=2016/9/25/ 21:2:15, v=3 device=light, date=2016/9/25/ 21:2:29, v=3 device=light, date=2016/9/25/ 21:2:44, v=3 device=light, date=2016/9/25/ 21:3:1, v=3 device=light, date=2016/9/25/ 21:3:15, v=3 device=light, date=2016/9/25/ 21:3:30, v=3 device=light, date=2016/9/25/ 21:3:44, v=3 currentDevice="yamaRasPiDp1_1",Date=2016/9/25/ 21:3:45 device=light, date=2016/9/25/ 21:3:59, v=3 currentDevice="yamaRasPiDp1_1",Date=2016/9/25/ 21:3:59