|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
CMU2Cam Degrees & more
Hi,
I'm Using the streamlined version downloaded for kevin.org/frc Is there a way to find out the degrees the pan and tilt are in relation to the horizontal and vertical zeros? (i.e camera looking straight forward) Plus, the zip file downloaded contains everything, the user_routines.c and all that. should i use this as the default code for 2007 and add my autonomous mode and joy controls and all that to that files? or is there a way to add the camera thingies to the 2007 Default code? Thanks, Carmel |
|
#2
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
Well, I can answer only your first question because I am programing in easyC and I don't know MPlabs as well.
for calculating the degrees you need to do the following: 1 degree=Tilt_range/Number_of_PWM same thing for the pan. The tilt range is the range of degrees the tilt/pan server can turn. Number of PWM is 256 (0...255). Last edited by itsme : 12-01-2007 at 09:57. Reason: changed ratio to range, ratio- wrong word |
|
#3
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
Thanks alot for that,
How can I find out the Tilt/Pan Ratio? |
|
#4
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
you need to see the the documentation about your servo, see how much it can turn in degrees.
Oh, and remember when calculating this way: the starting position (the middle of the range) is half of the ratio. For example: if the ratio is 180, then 1 degree equals about 0.7 PWM, and the starting position is in the middle, witch is 90 degrees, witch is about 127 PWM Last edited by itsme : 12-01-2007 at 09:38. |
|
#5
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
It's the servos we recieved from FIRST, we didn't get any docs with it
|
|
#6
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
To tell you the truth I'm not sure either. I can't find any documentations for this, no place writes how much degrees it has. So please someone answer our common question: how much degrees does it turn?
|
|
#7
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
|
|
#8
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
Quote:
And each degree is 90/256=0.3515625 degrees. :::EDIT::: It's not 90 degrees for sure, you can buy one with 180 degrees and one with 360 degrees. So can anybody tell how much degrees it is in the FIRST kit of parts? Last edited by itsme : 12-01-2007 at 18:26. |
|
#9
|
|||||
|
|||||
|
Re: CMU2Cam Degrees & more
Or, you can always drive the servo to 0, mark its position, drive it 255, mark its position, and then bust out a protractor.
We did a lot of testing to find the camera field of view and servo ranges in 2005. If I find them later, I will post them, although they may not be exactly the same. |
|
#10
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
http://www.acroname.com/robotics/inf.../mod322hd.html
look at 'step 4', first two lines more than 180: http://www.phidgetsusa.com/forums/ar...php?t-553.html Last edited by TEAM1949 : 13-01-2007 at 07:18. |
|
#11
|
|||
|
|||
|
Re: CMU2Cam Degrees & more
Quote:
Jason |
|
#12
|
||||
|
||||
|
Re: CMU2Cam Degrees & more
Quote:
The servos are driven with standard pwms, so instead of having the camera code create the pan & tilt pwms, have a joystick control the value of the pwm. Comment out servo_track() so the camera has no control of the servos, then do pwm01 = p1_y (with whatever pwms and joystick you want to use inserted there). |
|
#13
|
||||
|
||||
|
Re: CMU2Cam Degrees & more
Quote:
-Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Servo Values to Degrees... How? | mogunus | Programming | 16 | 11-04-2007 02:03 |
| engineering degrees | sciguy125 | Career | 18 | 17-03-2006 23:44 |
| Turn 90 Degrees | Mike | Math and Science | 16 | 05-12-2004 22:22 |
| More Pictures & Movies of Team 121 | Kyle Fenton | Robot Showcase | 9 | 18-02-2003 23:51 |
| TRADE ITEMS--EXCLUSIVE--MOE'S SIGNED SOCKS & MORE | archiver | 1999 | 2 | 23-06-2002 22:37 |