Hi,
Is it possible to switch off kinect for power safe, then switch ON when it is neccessary ?
This an example, but doesn't work:
from org.myrobotlab.service import Runtime
openni = Runtime.createAndStart("Kinect", "OpenNi")
python.subscribe(openni.getName(),"publishOpenNIData")
openni.startUserTracking()
def kinectPower(val):
openni.enableDepth(val)
openni.enableIR(val)
openni.enableRGB(val)
def onOpenNIData(data):
global skeleton
if data:
skeleton = data.skeleton
kinectPower(False)
sleep(10)
kinectPower(True)
Kinect power on/off
You could try to use a relay or FET and drive it from one of the I/O pins on the Arduino.
Yes good idea Matts. But, is
Yes good idea Matts.
But, is it possible to remove service (Runtime.createAndStart("Kinect", "OpenNi")) and put again when it is neccessary ?
Yes
# Start the OpenNi service as kinect
kinect = Runtime.start("kinect","OpenNi")
# Stop the service
kinect.releaseService()