Go to Post I think I wanna buy a Segway just to throw myself in the air to see what would happen... - Elgin Clock [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-01-2007, 22:42
teh_r4v3 teh_r4v3 is offline
Registered User
AKA: Rajeev Sharma
FRC #1511 (Rolling Thunder)
Team Role: Student
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Penfield, NY
Posts: 15
teh_r4v3 is on a distinguished road
Send a message via AIM to teh_r4v3
Re: Our two problems...

You'll want to make sure the servos are on the default PWM outs 1 and 2. (This conflicts with the drive motors of Default_Routine(), by the way, so make sure that the call to Default_Routine() is commented out.) The fact that the servos are twitching upon activation makes it sound like they're just getting a 127 output to me. If you can't use PWMs 1 and 2, you can easily redefine them in tracking.h (for the Kevin.org streamlined code, I've never used anything else).
__________________
Rajeev Sharma

Team 1511 Rolling Thunder

hoojamomma?
  #2   Spotlight this post!  
Unread 20-01-2007, 14:03
josh291 josh291 is offline
Registered User
FRC #0291 (CIA)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Erie, Pennsylvania
Posts: 6
josh291 will become famous soon enoughjosh291 will become famous soon enough
Re: Our two problems...

Quote:
Originally Posted by teh_r4v3 View Post
You'll want to make sure the servos are on the default PWM outs 1 and 2. (This conflicts with the drive motors of Default_Routine(), by the way, so make sure that the call to Default_Routine() is commented out.) The fact that the servos are twitching upon activation makes it sound like they're just getting a 127 output to me. If you can't use PWMs 1 and 2, you can easily redefine them in tracking.h (for the Kevin.org streamlined code, I've never used anything else).
Thanks, I'll try commenting out that Default_Routine() when I go back on Monday... I'm sure the camera itself works, I can take snapshots on it when I use it with the computer...

Quote:
Originally Posted by Eric Finn
If your camera code from last year worked fine, couldn't you just use that? Sure, the more recent code has more features, but your old code works.
We didn't use the camera last year in the end, so the only people who have the old camera code are the college students who borred the camera for a few days...

Quote:
Originally Posted by lynca
Take a look at the streamlined kevin watson's code , it worked off the bat , except you might have to change a few constants in tracking.h to get the servos to move in a different direction.
http://www.kevin.org/frc/frc_camera_s_21.zip
That is the one that I've been using
  #3   Spotlight this post!  
Unread 21-01-2007, 00:11
TheOtherGuy's Avatar
TheOtherGuy TheOtherGuy is offline
Unregistered User
AKA: Kevin Forbes
FRC #4183 (Bit Buckets)
Team Role: Engineer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 408
TheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond repute
Re: Our two problems...

we managed to get our camera working today. Here's what we did:

1. download the Kevin Watson's camera code (we used the bells and whistles version)

2. Make sure everything is plugged in. This includes the fully charged backup battery, main battery, pwm cable to the camera for power (plugged into any pwm port), pwm01 and pwm02 connected to pan and tilt respectively, and the TTL - RS232 converter chip is inserted correctly with a pwm cable running to the 3-pin RS232 port on the camera

3. make sure the lens cap is off of the camera and the camera switch is on.

4. turn on the microcontroller and, after building the camera code, download to the microcontroller.

5. press the reset button or turn off the microcontroller and turn it back on. You should see the green light and possibly the red one on the camera. At that point, if there is no target in sight, the camera should go into it's search mode.

6. check the terminal window on the computer (forgot to mention: make sure you leave the microcontroller connected so you can see the messages in the terminal window) If it says No camera data., you may need to check all the connections to make sure they work and then press the reset button. When we were working on the camera today, we found that the TTL - RS232 converter chip was somewhat loose, and after checking it and getting it on firmly, it seemed to work.

that's about all we did, and after much testing, it finally worked. You may find that it takes several days to locate the problem, but don't give up, the camera is very important (I think) in the game this year.
__________________
  #4   Spotlight this post!  
Unread 22-01-2007, 20:43
josh291 josh291 is offline
Registered User
FRC #0291 (CIA)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Erie, Pennsylvania
Posts: 6
josh291 will become famous soon enoughjosh291 will become famous soon enough
Re: Our two problems...

Okay, here is the update. Today I remembered to comment out the bit in the Default_Routine() with pwms 1 and 2 which got the camera to work, however it would seem not completely. I remember last year the camera would move around until it found the light, currently all our camera does is center itself to the home position.

This is quite a bit further than we were last meeting. Today was spent pouring over all of the tracking code to figure out how to get it to "search." The majority of our time was spent looking at the T_Packet code(whatever a T_Packet is ) trying to figure out how to get our camera to search.

I'm using the streamlined version of Kevin's camera code, our third and hopefully final problem: How to make it start searching?
  #5   Spotlight this post!  
Unread 22-01-2007, 22:19
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Our two problems...

Quote:
Originally Posted by josh291 View Post
I'm using the streamlined version of Kevin's camera code, our third and hopefully final problem: How to make it start searching?
One extremely important thing: make sure you have a fully charged backup battery plugged in. Without it, the camera won't talk, and the servos won't move.

Depending on which way you mounted the camera in the pan/tilt assembly, you might have to change the sign of the pan direction definition in the code. You can tell when this is necessary by seeing the camera "hide" from the light rather than seek it.
  #6   Spotlight this post!  
Unread 23-01-2007, 14:45
josh291 josh291 is offline
Registered User
FRC #0291 (CIA)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Erie, Pennsylvania
Posts: 6
josh291 will become famous soon enoughjosh291 will become famous soon enough
Re: Our two problems...

Quote:
Originally Posted by Alan Anderson View Post
One extremely important thing: make sure you have a fully charged backup battery plugged in. Without it, the camera won't talk, and the servos won't move.

Depending on which way you mounted the camera in the pan/tilt assembly, you might have to change the sign of the pan direction definition in the code. You can tell when this is necessary by seeing the camera "hide" from the light rather than seek it.
Our camera does not move at all. Whether we have the light in front of it or not. We've also made sure the backup battery is charged.


The only thing that I still do no understand is the T_Packets. Also, when I define which serial port the camera goes into... Serial Port 1 is the programming and Serial Port 2 is the tether correct?

And I just noticed the CMU cam sub-thread... should I have put this there instead?
  #7   Spotlight this post!  
Unread 23-01-2007, 15:03
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Our two problems...

Serial port 2 is the one labeled "TTL" (not the tether) and depending on which camera port you connect to it usually requires the tiny TTL-converter chip that came packaged with, but separate from, the camera board.

You'll want to keep your PC connected to the Program port while you test the camera, so you can see the status messages displayed to tell you what's wrong (or right) with the camera.

Did you look at the T-packet description?
http://kevin.org/frc/CMUcam2_data_packets.pdf

Yea, CMUCam issues should be posted in the CMUCam sub-forum, but we'll forgive you.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 23-01-2007 at 15:17.
  #8   Spotlight this post!  
Unread 23-01-2007, 19:12
josh291 josh291 is offline
Registered User
FRC #0291 (CIA)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Erie, Pennsylvania
Posts: 6
josh291 will become famous soon enoughjosh291 will become famous soon enough
Re: Our two problems...

I've finally got it all working.

Quote:
Originally Posted by Mark McLeod View Post
Serial port 2 is the one labeled "TTL" (not the tether) and depending on which camera port you connect to it usually requires the tiny TTL-converter chip that came packaged with, but separate from, the camera board.
Okay ^_^ that could have prevented a lot of confusion before I fixed it... I had thought the serial mentioned in the code refered to the serial cable port on the camera, so I left it plugged in... until I re-read the FAQ on Kevin's website and took it off...


Quote:
Originally Posted by Mark McLeod View Post
Did you look at the T-packet description?
http://kevin.org/frc/CMUcam2_data_packets.pdf
I'll get right on that now that the camera works I've got time...


Quote:
Originally Posted by Mark McLeod View Post
Yea, CMUCam issues should be posted in the CMUCam sub-forum, but we'll forgive you.
Yeah, my first post on this forum...

Anyways, my primary problem, aside from leaving the serial cable plugged in was that I never included terminal.c and terminal.h. I re-read the insrtuctions and found no reference to either.

Thanks for your help everyone. ^_^
Closed Thread


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
Two of our favorite people ... Stu Bloom General Forum 0 03-05-2006 15:49
Our pump has problems! waialua359 Pneumatics 7 24-01-2006 13:02
Problems with our school Team1726Nerds Chit-Chat 6 13-01-2006 23:55
Putting two and two together... Andy Grady General Forum 13 08-01-2004 18:29
problems with our programmer AlphaOmega870 Programming 12 31-01-2003 08:23


All times are GMT -5. The time now is 04:12.

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