Go to Post "Its not a glitch its a new feature, we just dont know how to use it yet" - Cuog [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
  #11   Spotlight this post!  
Unread 15-02-2006, 13:53
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

If I had pasted the exact code I used, it would have confused you more

See, you don't need that giant if block. As the code tells the servo to move closer and closer to the center of the target, the value of PAN_SERVO decreases more and more, until it reaches 127. So if you left it alone, it would slow down as it reached the center for you.

Depending on your turret design, the code that I gave would have turned back and forth over and over trying to line itself up correctly. It may have worked how it was, it depends on your robot design.

The tilt code is going to be very, very similar to the pan code.

You may need to add some limit switches, mechanical stops, or both to prevent the turret from spinning too far.
 


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