Go to Post In my opinion, if it can light a fire in your heart to burn with passion, and you can maintain that fine line between passionate and crazy; then go for it. Power to Passion. - RKElectricalman [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 17-01-2007, 21:53
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Unhappy first year team - cant get camera programmed

We are a first year team having trouble getting camera to work. We have created a test bed to test devices, and now trying to get camera to track. We have tested that the camera will move when told to by using the joy stick, but we cant get the easy c code to work. We tried the 2007 sample code and nothing happens, the camera does not turn at all. We tried our own code just to see if we had any values, and when we do a data capture and print, we have some values, but the camera does not move or track at all. My students are familiar with easy c, but not sure how to convert kevins code to easy c. Also since the easy c demo 2007 code didnt work, we are wondering if the camera has some other problem. We keep reading and looking but so far havent come up with a solution. We tried downloading the camera.hex code from kevin and when we get that we get a message no camera data. Any suggestions on what to try next?????
  #2   Spotlight this post!  
Unread 17-01-2007, 22:00
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: first year team - cant get camera programmed

You say you have values; what are the servos connected to?

I have seen probably 15 threads on the camera not working. I plan on writing up an FAQ because it would appear we really need one. I also need to learn EasyC.

JBot
__________________
Aren't signatures a bit outdated?
  #3   Spotlight this post!  
Unread 17-01-2007, 22:11
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: first year team - cant get camera programmed

we have the pan connected to pwm 1, tilt to pwm 2
we get the output values for the centroid x,y; values for the region x,y (i cant remember what they were, I am at home now and dont have them). I guess I am wondering how we tell the camera to tilt or pan in the c code so that we can prove it is working. we tried to use the set servo to reposition the x, y locations multiple times within a loop, started the camera each time, and never saw the camera move. I am thinking we are really off track on somehting here. We just want to confirm the camera will move and we cant seem to get anything to happen. Should we go back and use kevin code through the mplab and just forget easy c for now?
  #4   Spotlight this post!  
Unread 17-01-2007, 22:44
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: first year team - cant get camera programmed

Quote:
Originally Posted by sniggel View Post
we have the pan connected to pwm 1, tilt to pwm 2
we get the output values for the centroid x,y; values for the region x,y (i cant remember what they were, I am at home now and dont have them). I guess I am wondering how we tell the camera to tilt or pan in the c code so that we can prove it is working. we tried to use the set servo to reposition the x, y locations multiple times within a loop, started the camera each time, and never saw the camera move. I am thinking we are really off track on somehting here. We just want to confirm the camera will move and we cant seem to get anything to happen. Should we go back and use kevin code through the mplab and just forget easy c for now?
If you are using the 2007 kickoff easyC code, it expects the pan servo to be connected to pwm 10 and the tilt to be connected to pwm 11. You can change the settings for these with the macros/constants dialog in easyC by pressing F6.

Edit: If you use the SetServoPosition() function, it only works if the servos are connected to the camera board. Since this is impossible with this year's camera, it will not work. To move the servos, use the SetPWM() function (look under the "Output" node on the function block treeview).
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award

Last edited by MattD : 17-01-2007 at 22:54.
  #5   Spotlight this post!  
Unread 18-01-2007, 10:05
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: first year team - cant get camera programmed

Do you have the backup battery connected to the controller?
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
  #6   Spotlight this post!  
Unread 18-01-2007, 10:20
Imajie Imajie is offline
Registered User
AKA: James Letendre
FRC #0195 (Cyber Knights)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Southington
Posts: 114
Imajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud of
Send a message via AIM to Imajie
Re: first year team - cant get camera programmed

Yes, the PWM ports are powered using the backup battery, so no backup no tracking.
__________________
2007 UTC Champions Thanks 1124 and 558
2007 UTC GM Industrial Design Award

2006 Newton Divisional Winners
2006 Championship finalists
(Thanks 25 and 968 for picking us!)
2006 National Innovation in Control
  #7   Spotlight this post!  
Unread 18-01-2007, 15:24
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Red face Re: first year team - cant get camera programmed

Yes, the PWM ports are powered using the backup battery. We have downloaded kevin's code the camera now says
searching
searching
gives data readout
searching
searching
about 25 times and sometimes gives another readout, sometimes does not.
We have tried moving the greenlight around, and the camera does not track it and does not move towards it. Are we missing something else?
  #8   Spotlight this post!  
Unread 18-01-2007, 15:32
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: first year team - cant get camera programmed

Here's a check list:
1. You have to have a backup battery/7.2 volt source connected to the robot controller in the backup battery place.
2. As said before: this year you can't use the Servo Tracking function in easyC.
3. Try downloading the online code in easyc (in order to download the code press and hold for about a second the program button that is on the robot controller until the light turns orange, and download). Try moving the servos over there (in the online terminal). If still the servos aren't moving there is probably a power problem.
4. The OI (operator interface) has to be connected to the RC (robot controller) either by the red tether cable (if it's your first time connecting it) or by the radios (with the radio connections).
5. In order to make the program work you have to have at least one joystick connected to the OI.
6. Check that you have connected the top cable of the camera board to a PWM port on your RC, and that the bottom cable of the camera board is connected to the TTL card that is connected to the RC.
7. Be sure that when you programed the camera you first initialized it (when the camera initializes it puts on the red and green light, when the initialization is over, only the green light is lid, and when the camera finds an object with the color you programed it to see then the red light lights to). Be sure you used the Start Camera function too.
8. Put the green light in the same conditions of light that would be in the FIRST competition.

Well, that's what I could think of, if I'll have more I'll add

Last edited by itsme : 19-01-2007 at 09:53. Reason: Accidently wrote bottom instead of top...
  #9   Spotlight this post!  
Unread 18-01-2007, 16:10
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: first year team - cant get camera programmed


So it's the top PWM to the TTL and the bottom to the PWM RC pin area????
  #10   Spotlight this post!  
Unread 19-01-2007, 09:52
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: first year team - cant get camera programmed

Quote:
Originally Posted by Bomberofdoom View Post

So it's the top PWM to the TTL and the bottom to the PWM RC pin area????
You're right. I accidentally wrote bottom instead of top.
The power switch has to be on the top in the pan/tilt stand. The top connection connects to a free PWM on the robot controller and the bottom one connects to the TTL port. Be sure to connect it right (black in the side that is written B, or BLK on the TLL card).
Chek out this drawing for more information: http://www.ifirobotics.com/docs/cmu-...a-assembly.pdf

According to the pdf (and according to me) you are supposed to connect between the RS-232 connection to the TTL that is connected to the RC.

Last edited by itsme : 19-01-2007 at 09:54.
  #11   Spotlight this post!  
Unread 19-01-2007, 23:14
slloyd slloyd is offline
Registered User
AKA: Sonny
FRC #1221 (Nerbotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: CANADA -eh?
Posts: 20
slloyd is an unknown quantity at this point
Talking Re: first year team - cant get camera programmed

hi peoples,

i'm just having difficulty understanding how the TTL port is hooked up on the 2007 robot. i see lots of documents and discussion about the 2006, but that was different connection i think.. right?

ifirobotics has this to say:

"The assembly comes with an RS-232 converter board to interface with the FRC Robot Controller. A 3 wire PWM cable is used to connect the converter board to the camera. The RS-232 converter board is design to mount directly onto the Robot Controller, no cable is required. You can also modify a PWM cable to connect power from the Robot Controller to the camera assembly."

so the TTL to RS-232 Converter Board plugs into the robot controller, not the camera. then a PWM cable is connected between the converter board and the camera. if this is true, why does their website say "no cable is required"? also why do they say that a "modify a pwm cable to connect power" when you don't need to modify the cable at all, its perfect right out of the bag. just plug it in between any PWM output channel and your camera and :oof:: you have power (assuming you have battery backup installed on RC).

finally, if all i want to do is track green colour, then i need the converter board assembled correctly and wired (or not..?) and i do NOT want to plug in any DB9 between camera and PC..

it seems simple enough, yet its not entirely clear. can someone dumb it down a little more for me?

thanks
slloyd

Last edited by slloyd : 19-01-2007 at 23:28.
  #12   Spotlight this post!  
Unread 20-01-2007, 00:51
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: first year team - cant get camera programmed

Sniggle,

One thing I haven't seen anyone mention here yet is to make sure you run through the calibration procedure using Labview. This will make sure you have the right settings for your camera to track the green light. This will also result in making sure your camera is focused.
  #13   Spotlight this post!  
Unread 20-01-2007, 02:20
team877's Avatar
team877 team877 is offline
Registered User
FRC #0877 (Cub Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2001
Location: North Dakota
Posts: 52
team877 is an unknown quantity at this point
Re: first year team - cant get camera programmed

I haven't quite figured out everything on the cam yet this year, but what i think the best thing to do is read the tutorials in help menu. read and try doing all of them accept the gyros and other sensors that a few people don't have. it instructs you on how to do many things and will also allow you to test your camera...i think its in the graphic display section...if you have anymore questions you can email me at hockey_man48@hotmail.com

Adam, Programming
Cub Robotics
Team 877
Cando, ND
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
Labview cant find the camera kevin.fort LabView and Data Acquisition 5 19-01-2007 12:18
I cant get my program into a hex file Serge Programming 8 17-02-2006 03:28
cant get into autonomus blindguyinanorg Programming 7 20-02-2004 17:06
Why cant we get girls interested in joining our team?! Advice please! rmadsen55 General Forum 61 08-10-2002 08:14
cant get to the Chat feature Elgin Clock CD Forum Support 4 28-01-2002 07:37


All times are GMT -5. The time now is 05:50.

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