View Full Version : Phidget controlled Gun Turret defends home

06-13-2007, 10:43 AM
How could I forget the gun turret running off of a 4-Servo controller?? The first video got over 150,000 views. Check them out:


and the newer version with upgraded geared servo mountings:

The problem I have is that I don't think the servo controller can report when it is stopped moving, etc. So I don't know when to activate motion tracking again, etc. I could use an accelerometer or something to disable motion tracking while the gun is moving, but then the project costs get way out of hand.

This project is awesome for manual control and the motion tracking and auto-fire still impresses people even though it is jerky because of pauses before tracking after moving.

www.vCrib.com (http://www.vCrib.com)

06-15-2007, 04:04 PM

The Phidget servo controller doesn't report when it has stopped moving, but it does report when it is moving.

So, with the combination of hooking the PositionChange event and using a class level boolean you can accomplish the same thing. Just set the boolean to true when it enters the PositionChange event, and set it to false when it exits. You'll might have to set up a separate counter of some sort to wait for a few seconds after the boolean was set to false though, otherwise your motion tracking will bounce on and off.

That's just the first idea I have. I'm sure that'll work, but if for some reason it doesn't, give me a little more info on your system, and I help you figure out a better solution:)

For future reference, you can embed YouTube videos into your post directly. Check it out: