PDA

View Full Version : Listening for Phidgets 8/8/8 sensors without a GUI to persist thread



wmccafferty
02-15-2007, 10:13 PM
I haven't gotten any response when I asked Phidgets about this, so perhaps you guys might have some insight: http://www.phidgets.com/index.php?name=PNphpBB2&file=viewtopic&t=1468.

Thanks for any insight you might have!

Billy

Alex
02-16-2007, 09:20 AM
What does your SensorValueChanged event look like?

Alex
02-16-2007, 09:32 AM
You have the Thread.Sleep() method in the SensorValueChanged event? I'm not sure if Phidgets had changed this, but I believe that Phidgets run on a seperate thread than your class.

Is it possible that Thread.Sleep() is only telling your class thread to sleep? I'm not too experienced in threading, so these are just ideas that I'm throwing out there.

Regarding your second question:



So the next question, now that I've pinned down the root of the problem...how can I get my thread to wait for sensor inputs without having to have a GUI to keep the thread alive and without using Thread.Sleep?

I'm going to have to test it when I get back into work on Monday.

EDIT: BTW, did you happen to see this post:
http://forums.trossenrobotics.com/showthread.php?p=3869#post3869

wmccafferty
02-16-2007, 12:56 PM
I think I have a solution... http://www.phidgets.com/index.php?name=PNphpBB2&file=viewtopic&t=1468. I'll give it a whirl when my sensors come back.

Billy