Go to Post Unfortunately, there's no special type of transmission that will magically get you past defense. The best way to deal with defense is to practice, regardless of gearing. - connor.worley [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 14-02-2006, 18:06
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: Camera isn't working

Theres a difference between the servo's and the motor:

Lets say you have a servo on pwm01 and a motor on pwm02. You then set them both equal to 200. (pwm01=pwm02=200
With the servo's, your command of 200 represents POSITION. The servo will move to where it thinks position 200 is, and stay there.
With the motor's, your command of 200 represents SPEED. The motor will start spinning forward.

It sounds to me like you locked your camera and gun's pan together. Doing so, you lose the advantage of being able to use the included code. Your pans while scanning for the target may also be slower. You gain the advantage of not having to compensate for an off-center camera.

There is a simple way to control the motor from the camera, without any sort of feedback on the pan mechanism. To do this, change PAN_SERVO to an unused pwm port, and don't hook anything up to it, then take a look below:
Code:
if PAN_SERVO is facing left
PAN LEFT
else if PAN_SERVO is facing right
PAN RIGHT
else
DONT PAN
When the camera locks on to something, it will start trying to pan towards that object. The above "code" will read which way it is trying to pan, and pan for it with your rotation mechanism. It works pretty well, provided that your turret can keep up
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Who has the camera working? cvbritton Programming 43 28-01-2007 13:46
Camera shows no love to drive motors anifinder Programming 4 13-02-2006 10:31
Camera code not working.... DemonYawgmoth Programming 5 11-02-2006 09:21
Camera not working st1nkm4n Programming 7 02-02-2006 08:22
Camera stops working when we use camera_set_servos()... SeanCassidy Programming 16 13-02-2005 03:08


All times are GMT -5. The time now is 02:11.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi