How to make a camera work continiously

Questions about Marilou Open Devices Access (MODA)
Post Reply
wangxiao3952
Posts: 16
Joined: Tue Jan 20, 2009 6:37 pm

How to make a camera work continiously

Post by wangxiao3952 » Fri Jan 30, 2009 11:11 pm

HI, i want to get the images continiously during im controlling the robot. But in fact in the samples i see a while loop, but we cant control the robot while doing this loop. Is there a soloution?> :shock:

LR
Posts: 305
Joined: Mon Feb 12, 2007 11:55 pm
Location: FR

Post by LR » Sat Jan 31, 2009 3:49 pm

Of course you can control the robot during this loop: you just have to insert the motors/sensors commands in the while().

If you want to make a second loop (1 for the camera, the other for the control), you can create 2 threads with 1 loop inside every thread.

The first loop controls the robot, the other captures images from camera.
LR

Post Reply